Back to Sparse Matrices
nzmax
Amount of storage allocated for nonzero elements
Syntax
n = nzmax(S)
Description
Returns the amount of storage allocated for nonzero matrix elements. Returns the same as nnz(S) since JS arrays auto-resize.
Parameters
| Name | Description |
|---|---|
| S | Sparse matrix |
Returns
Allocated storage size