nnz
Return the number of nonzero elements.
Syntax
v = nnz(M)
Input argument
M - a matrix: double or logical, sparse or not.
Output argument
v - a integer value.
Description
nnz returns the number of non zero elements in an matrix.
Example
See also
History
Version
Description
1.0.0
initial version
Author
Allan CORNET
Last updated
Was this helpful?