s = spones(S)
| Parameter | Description |
|---|---|
| S | Sparse or 2D matrix. |
| Parameter | Description |
|---|---|
| S | a sparse matrix. |
s = spones(S) returns a matrixs with the same sparsity structure asS, but with one's in the nonzero positions.
S = sparse([1,0;3,4]);
R = spones(S)
| Version | Description |
|---|---|
| 1.0.0 | initial version |