Given column vectors I, J, and V, one can construct a sparse matrix using 
the following syntax:

sparse(I, J, V)

How about the reverse? I.e., given a sparse matrix S, is there a function 
which returns the column vectors I, J, and V that define S?

One can obtain the list of nonzero values V with the command

nonzeros(S)

but I'm not sure how to get the row and column coordinates I and J that go 
along with V. Is there a convenient way to obtain I and J?

Reply via email to