Learn R Programming

matlab (version 1.0.4.1)

eye: MATLAB eye function

Description

Create an identity matrix.

Usage

eye(m, n)

Value

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

Arguments

m, n

numeric scalar specifying dimensions for the result

Author

P. Roebuck proebuck1701@gmail.com

See Also

ones, zeros

Examples

Run this code
eye(3)

Run the code above in your browser using DataLab