help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iterating through the rows of a sparse matrix


From: Tirumurti, Chandra
Subject: iterating through the rows of a sparse matrix
Date: Fri, 7 Dec 2007 16:23:39 -0800

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

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]