~ubuntu-branches/ubuntu/natty/suitesparse/natty

« back to all changes in this revision

Viewing changes to CSparse/MATLAB/CSparse/cs_permute.m

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2006-12-22 10:16:15 UTC
  • Revision ID: james.westby@ubuntu.com-20061222101615-2ohaj8902oix2rnk
Tags: upstream-2.3.1
ImportĀ upstreamĀ versionĀ 2.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function C = cs_permute (A,p,q)                                             %#ok
 
2
%CS_PERMUTE permute a sparse matrix.
 
3
%   C = cs_permute(A,p,q) computes C = A(p,q)
 
4
%
 
5
%   Example:
 
6
%       Prob = UFget ('HB/arc130') ; A = Prob.A ; [m n] = size (A) ;
 
7
%       p = randperm (m) ; q = randperm (n) ;
 
8
%       C = cs_permute (A,p,q) ;    % C = A(p,q)
 
9
%
 
10
%   See also CS_SYMPERM, SUBSREF.
 
11
 
 
12
%   Copyright 2006, Timothy A. Davis.
 
13
%   http://www.cise.ufl.edu/research/sparse
 
14
 
 
15
error ('cs_permute mexFunction not found') ;