Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

eig (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: linalgebra

Requires: MathScript RT Module


ev = eig(a)

ev = eig(a, b)

[evec, evdiag] = eig(a)

[evec, evdiag] = eig(a, b)


Computes the eigenvalues and eigenvectors for real or complex square matrices. eig(a) solves the standard problem ax = lambda*x. eig(a, b) solves the general problem ax = lambda*bx.




Name Description
a Specifies a square matrix whose dependent matrices also are square.
b Specifies a matrix of the same size as a. If you specify b, LabVIEW calls the qz function.


Name Description
ev Returns the eigenvalues of a or the generalized eigenvalues of a and b. ev is a vector.
evec Returns a square matrix whose columns are the normalized eigenvectors of a or the normalized generalized eigenvectors of a and b.
evdiag Returns a matrix of the same type as a with the elements of ev on the diagonal.


LabVIEW does not solve for the off-diagonal Jordan structure associated with repeated roots. If repeated roots to eig(a) or eig(a, b) exist, LabVIEW might artificially ill-condition evec.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


% Eigenvalues
A = [2, -1; 11, 4]
C = eig(A)
% Compute generalized eigenvalues and check results
B = [3, 2; -9, -1]
[EVEC, EVDIAG] = eig(A, B)

Related Topics



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