Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

nonzeros

Nonzero matrix elements

Syntax

s = nonzeros(A)

Description

s = nonzeros(A) returns a full column vector of the nonzero elements in A, ordered by columns.

This gives the s, but not the i and j, from [i,j,s] = find(A). Generally,

length(s) = nnz(A) <= nzmax(A) <= prod(size(A))

See Also

| | | | |

Introduced before R2006a

Was this topic helpful?