S = spalloc(m, n, nz)
| Parameter | Description |
|---|---|
| m | number of rows. |
| n | number of columns. |
| nz | requested storage allocation for nonzero elements. |
| Parameter | Description |
|---|---|
| S | a sparse double matrix. |
spalloc creates an m-by-n sparse double matrix and reserves storage for up to nz nonzero elements.
S = spalloc(3, 4, 5)
nzmax(S)
| Version | Description |
|---|---|
| 2.0.0 | initial version |