MTM
eye
identity matrix
speye
sparse identity matrix
Calling Sequence
Parameters
Description
Examples
eye()
eye(n)
eye(n,m)
eye(X)
speye()
speye(n)
speye(n,m)
speye(X)
n, m
-
positive integers
X
list or array
The eye function returns a dense identity matrix with specified dimensions.
The speye function returns a sparse identity matrix with specified dimensions.
If n is an integer and m is omitted, the resulting matrix is square.
If the input X is an array, its elements are used as the dimensions of the matrix.
with⁡MTM:
eye⁡4
1000010000100001
eye⁡4,5
10000010000010000010
speye⁡4
speye⁡4,5
See Also
IdentityMatrix
MTM[diag]
Download Help Document