nnz
Number of nonzero elements in fi object
Syntax
Description
returns the
number of nonzero elements in N = nnz(X)X.
When X is a built-in MATLAB® type, floating-point fi object, or scaled double
fi object, N is returned as a
double. When X is a fixed-point
fi object, N is returned as a
uint32 if X has fewer than
232 elements. Otherwise, N is returned as
a uint64.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2020b