Returns the number of non-zero elements in a matrix.
c = numnz(a)Legacy name: nnz
Array of any dimension.
Number of non-zero elements in a. c is an integer.
A = [1, 2, 3; 0, 0, 0; 0, 2, 3]; C = numnz(A)
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices