iterating through the rows of a sparse matrix

Tirumurti, Chandra chandra.tirumurti at intel.com
Fri Dec 7 18:23:39 CST 2007


Hello,

 

New to Octave and loving it. I do have a question. I have a matrix X =

 

0 1

2 3

 

[ri, ci] = spfind(X); gives me the row indices of non-zero elements in
ri and column indices in ci.

 

ri =

2

1

2

 

ci =

1

2

2

 

This gives me a sequences of elements sorted (stacked) by columns 1,2
etc.

Is there a way to do the other way, ie, I want to get a list by row.

Also I am dealing with large matrices.

 

-Chandra

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/help-octave/attachments/20071207/0d58336c/attachment.html 


More information about the Help-octave mailing list