MATLAB Functions Help Desk

eigs

Purpose

Find a few eigenvalues and eigenvectors

Syntax

Description

eigs solves the eigenvalue problem A*v = lambda*v or the generalized eigenvalue problem A*v = lambda*B*v. Only a few selected eigenvalues, or eigenvalues and eigenvectors, are computed.

[V,D] = eigs(A) or [V,D] = eigs('Afun',n) solves the eigenvalue problem where the first input argument is either a square matrix (which can be full or sparse, symmetric or nonsymmetric, real or complex), or a string containing the name of an M-file which applies a linear operator to the columns of a given matrix. In the latter case, the second input argument must be n, the order of the problem. For example, eigs('fft', ...) is much faster than
eigs(F, ...) where F is the explicit FFT matrix.

With one output argument, D is a vector containing k eigenvalues.With two output arguments, D is a k-by-k diagonal matrix and V is a matrix with k columns so that A*V = V*D or A*V = B*V*D.

The remaining input arguments are optional and can be given in practically any order:

Argument

Value

B

A matrix the same size as A. If B is not specified,
B = eye(size(A)) is used.

k

An integer, the number of eigenvalues desired. If k is not specified, k = 6 eigenvalues are computed.

sigma

A scalar shift or a two letter string. If sigma is not specified, the k-th eigenvalues largest in magnitude are computed. If sigma is 0, the k-th eigenvalues smallest in magnitude are computed. If sigma is a real or complex scalar, the shift, the k-th eigenvalues nearest sigma, are computed. If sigma is one of the following strings, it specifies the desired eigenvalues:

'lm' Largest Magnitude (the default)

'sm' Smallest Magnitude (same as sigma = 0)

'lr' Largest Real part

'sr' Smallest Real part

'be'       Both Ends. Computes k/2 eigenvalues from            each end of the spectrum (one more from the            high end if k is odd.)

The options structure specifies certain parameters in the algorithm.

Parameter

Description

Value

options.tol

Convergence tolerance

norm(A*V-V*D) <= tol

1e-10 (symmetric)

1e-6 (nonsymmetric)

options.p

Dimension of the Arnoldi basis

2*k

options.maxit

Maximum number of iterations

300

options.disp

Number of eigenvalues displayed at each iteration. Set to 0 for no intermediate output.

20

options.issym

Positive if Afun is symmetric

0

options.cheb

Positive if A is a string, sigma is 'lr','sr', or a shift, and polynomial acceleration should be applied.

0

options.v0

Starting vector for the Arnoldi factorization

rand(n,1)-.5

See Also

eig         Eigenvalues and eigenvectors

svds        Singular value decomposition



[ Previous | Help Desk | Next ]