eig

Eigen decomposition.

Syntax

d = eig(A)

d = eig(A,B)

[V,D] = eig(A)

[V,D] = eig(A,'nobalance')

[V,D] = eig(A,B)

Inputs

A
The matrix to decompose.
Type: double
Dimension: matrix
B
The right hand side matrix in a generalized Eigen problem.
Type: double
Dimension: matrix

Outputs

d
Eigenvalue vector.
vector
V
Eigen vector matrix.
matrix
D
Eigenvalue diagonal matrix.
matrix

Example

``[V,D]=eig([58,32,84;32,-18,-44;84,-44,50])``
``````V = [Matrix] 3 x 3
-0.49774   0.49636   0.71125
0.66719   0.74309  -0.05167
0.55417  -0.44882   0.70103
D = [Matrix] 3 x 3
-78.41904   0.00000    0.00000
0.00000  29.95102    0.00000
0.00000   0.00000  138.46802``````

Comments

[V,D] = eig(A) computes matrices V and D such that AV = VD).

[V,D] = eig(A,'nobalance') omits the balancing operation.

[V,D] = eig(A,B) computes matrices V and D such that AV = BVD.

eig(A) uses the LAPACK routines 'dsyev' for real symmetric matrices and 'zheev' for complex Hermitian matrices.

eig(A) uses the LAPACK routines 'dgeevx' for real asymmetric matrices and 'zgeevx' for complex non-Hermitian matrices.

eig(A,B) uses the LAPACK routines 'dsygv' for real symmetric matrices and 'zhegv' for complex Hermitian matrices.

eig(A,B) uses the LAPACK routines 'dggev' for real asymmetric matrices and 'zggev' for complex non-Hermitian matrices.