FUNCTION REFERENCE
speye
Sparse identity matrix.
Sparse identity matrix.
Syntax
S = speye(n)Syntax
S = speye(m, n)Syntax
S = speye([m n])Ones on the main diagonal of an m-by-n sparse array; speye with no input is 1-by-1.
Example
S = speye(3) % three stored onesExample
nnz(speye(2, 4)) % 2Differences from MATLAB: none known.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.