Main Content

Sparse identity matrix

`S = speye`

returns a sparse scalar `1`

.

`S = speye(`

returns a sparse
`n`

)`n`

-by-`n`

identity matrix, with ones on the main
diagonal and zeros elsewhere.