Learn R Programming

matlab (version 1.0.2)

eye: MATLAB eye function

Description

Create an identity matrix.

Usage

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.

See Also

ones, zeros

Examples

Run this code
eye(3)

Run the code above in your browser using DataLab