FUNCTION REFERENCE
eig
Eigenvalues and eigenvectors.
Eigenvalues and eigenvectors.
Syntax
e = eig(A)Syntax
[V, D] = eig(A)Syntax
[V, D, W] = eig(A)Syntax
e = eig(A, B)Syntax
[V, D] = eig(A, B, algorithm)Syntax
[...] = eig(..., 'vector'), eig(..., 'matrix'), eig(A, 'nobalance')Real symmetric and complex Hermitian A use the symmetric solver (ascending eigenvalues); other matrices use balancing, Hessenberg reduction and the QR algorithm, like LAPACK dgeev/zgeev. W holds left eigenvectors (W'*A = D*W'). eig(A, B) solves A*V = B*V*D; algorithm is 'chol' (default for symmetric A with symmetric positive definite B) or 'qz'. Single input gives single-rounded results.
Example
eig([2 1; 1 2]) % [1; 3]Example
[V, D] = eig([2 0; 0 3], [1 0; 0 2]); x = diag(D)' % [1.5 2]Differences from MATLAB: Some results differ in the last printed digit. Single input is computed in double and rounded, so the last single digit can differ. Real results retain single storage; complex results use double storage with single rounding. Sparse input is not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.