Next: spfun, Previous: speye, Up: Function Reference
A sparse version of the
find
function. Please see thefind
for details of its use.Note that this function is particularly useful for sparse matrices, as it extracts the non-zero elements as vectors, which can then be used to create the original matrix. For example,
sz = size(a); [i, j, v] = spfind (a); b = sparse(i, j, v, sz(1), sz(2));See also: sparse.