munit
Unit (identity) matrix.
Syntax
Section titled “Syntax”v = munit(array)Description
Section titled “Description”Returns an identity matrix of the same size as array. (array must be square.) For an explicit n × n identity from a number, use eye.
Example
Section titled “Example”munit(zeros(3, 3)) % 3×3 identity