Navigation

Operators and Keywords

Function List:

C++ API

: lambda = eig (A)
: lambda = eig (A, B)
: [V, lambda] = eig (A)
: [V, lambda] = eig (A, B)
: [V, lambda, W] = eig (A)
: [V, lambda, W] = eig (A, B)
: […] = eig (A, balanceOption)
: […] = eig (A, B, algorithm)
: […] = eig (…, eigvalOption)

Compute the right eigenvalues(V) and optionally the eigenvectors(lambda) and the left eigenvalues(W) of a matrix or a pair of matrices.

The flag balanceOption can be one of:

"balance"

Preliminary balancing is on. (default)

"nobalance"

Disables preliminary balancing.

The flag eigvalOption can be one of:

"matrix"

Return the eigenvalues in a diagonal matrix. (default if 2 or 3 outputs are specified)

"vector"

Return the eigenvalues in a column vector. (default if 1 output is specified, e.g. lambda = eig (A))

The flag algorithm can be one of:

"chol"

Uses the Cholesky factorization of B. (default if A is symmetric (Hermitian) and B is symmetric (Hermitian) positive definite)

"qz"

Uses the QZ algorithm. (When A or B are not symmetric always the QZ algorithm will be used)

no flagcholqz
both are symmetric"chol""chol""qz"
at least one is not symmetric"qz""qz""qz"

The eigenvalues returned by eig are not ordered.

See also: eigs, svd.

Package: octave