Mercurial > hg > smallbox
comparison util/ksvd utils/sprow.m @ 70:c3eca463202d
(none)
author | idamnjanovic |
---|---|
date | Wed, 16 Mar 2011 14:16:57 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
69:5f1f436057ca | 70:c3eca463202d |
---|---|
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 |