next up previous contents
Next: FLIPDIM Reverse a Matrix Up: Array Generation and Manipulations Previous: CIRCSHIFT Circularly Shift an   Contents

Subsections

EYE Identity Matrix

USAGE

Creates an identity matrix of the specified size. The syntax for its use is

   y = eye(n)

where n is the size of the identity matrix. The type of the output matrix is float.

Example

The following example demonstrates the identity matrix.

--> eye(3)
ans = 
  <float>  - size: [3 3]
 
Columns 1 to 3
    1.0000000          0.00000000         0.00000000      
    0.00000000         1.0000000          0.00000000      
    0.00000000         0.00000000         1.0000000


Samit K. Basu 2005-03-16