MATLAB eye function

Share:

Description

Create an identity matrix.

Usage

1
eye(m, n)

Arguments

m, n

numeric scalar specifying dimensions for the result

Value

Returns matrix of order 1. Defaults to square if second dimension argument n not provided.

Author(s)

P. Roebuck proebuck@mdanderson.org

See Also

ones, zeros

Examples

1
eye(3)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.