Owning Class: linalgebra
Requires: MathScript RT Module
c = numnz(a)
Legacy Name: nnz
Returns the number of non-zero elements in a matrix.
| Name | Description |
|---|---|
| a | Specifies a matrix. |
| Name | Description |
|---|---|
| c | Returns the number of non-zero elements in a. c is an integer. |
A = [1, 2, 3; 0, 0, 0; 0, 2, 3]
C = numnz(A)