Navigation

Operators and Keywords

Function List:

C++ API

: s = speye (m, n)
: s = speye (m)
: s = speye (sz)

Return a sparse identity matrix of size mxn.

The implementation is significantly more efficient than sparse (eye (m)) as the full matrix is not constructed.

Called with a single argument a square matrix of size m-by-m is created. If called with a single vector argument sz, this argument is taken to be the size of the matrix to create.

See also: sparse, spdiags, eye.

Package: octave