Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

eye (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the matrix class.

Syntax

c = eye(n)

c = eye(m, n)

c = eye([m, n])

c = eye(size(a))

Description

Generates an identity matrix. An identity matrix has ones on the main diagonal and zeros elsewhere.

Examples

Inputs

Name Description
m Specifies the number of rows for the identity matrix. m is an integer.
n Specifies the number of columns for the identity matrix. n is an integer.
a Specifies a square matrix.

Outputs

Name Description
c Returns an identity matrix with m rows and n columns, or of the same size as a. c = eye(n) returns an n-by-n matrix.

Examples

C = eye(3, 3)

Related Topics

ones


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit