| Group: | Matrix Manipulation |
| Topic: | General Commands |
| See also: | unit matrix diag zeros |
| Function: | eye | |
| Description: | creates a d-dimensional identity matrix |
| Usage: | z = eye(d) | |
| Input: | ||
| d | positive integer, dimension of matrix | |
| Output: | ||
| z | d x d identity matrix | |
z = eye(3) z
Contents of z [1,] 1 0 0 [2,] 0 1 0 [3,] 0 0 1