FUNCTION REFERENCE

eigs

A few eigenvalues and eigenvectors.

A few eigenvalues and eigenvectors.

Syntax

d = eigs(A)

Syntax

d = eigs(A, k)

Syntax

d = eigs(A, k, sigma)

Syntax

d = eigs(A, k, sigma, opts)

Syntax

[V, D, flag] = eigs(A, B, k, sigma, opts)

Returns the k (default 6) eigenvalues selected by sigma: 'lm' (default), 'sm', 'la', 'sa', 'lr', 'sr', 'li', 'si', 'be' or a number (closest to it). flag is 0 when the eigenvalues were found.

Example

eigs(diag(1:10), 2)   % [10; 9]

Differences from MATLAB: Computed with a dense eigensolver instead of ARPACK, so results agree with MATLAB to about 1e-12 relative, not to every digit. 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.