comparison Problems/private/sprow.m @ 61:42fcbcfca132

(none)
author idamnjanovic
date Tue, 15 Mar 2011 12:21:31 +0000
parents 51b76c31c93d
children
comparison
equal deleted inserted replaced
60:ad36f80e2ccf 61:42fcbcfca132
1 %SPROW Extract row of sparse matrix.
2 % X = SPROW(A,J) where A is a sparse matrix, returns the nonzero values in
3 % the row A(J,:).
4 %
5 % [X,ID] = SPROW(A,J) also returns the column indices of the nonzeros.
6 %
7 % Note that the call [X,ID] = SPROW(A,J) is equivalent (but more efficient
8 % than) the Matlab code
9 %
10 % IDS = find(A(J,:));
11 % X = A(J,IDS);
12
13
14 % Ron Rubinstein
15 % Computer Science Department
16 % Technion, Haifa 32000 Israel
17 % ronrubin@cs
18 %
19 % August 2009