23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

eye<br />

2eye<br />

Purpose Identity matrix<br />

Syntax Y = eye(n)<br />

Y = eye(m,n)<br />

Y = eye(size(A))<br />

Description Y = eye(n) returns the n-by-n identity matrix.<br />

2-516<br />

Y = eye(m,n) or eye([m n]) returns an m-by-n matrix with 1’s on the<br />

diagonal and 0’s elsewhere.<br />

Y = eye(size(A)) returns an identity matrix the same size as A.<br />

Limitations The identity matrix is not defined for higher-dimensional arrays. The<br />

assignment y = eye([2,3,4]) results in an error.<br />

See Also ones, rand, randn, zeros

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!