Mathematics Previous page   Next Page

Eigenvalues and Singular Values

Two functions are available which compute a few specified eigenvalues or singular values. svds is based on eigs which uses ARPACK [6].

Functions to Compute a Few Eigenvalues or Singular Values  
Function
Description
eigs
Few eigenvalues
svds
Few singular values

These functions are most frequently used with sparse matrices, but they can be used with full matrices or even with linear operators defined by M-files.

The statement

finds the k eigenvalues and corresponding eigenvectors of the matrix A which are nearest the "shift" sigma. If sigma is omitted, the eigenvalues largest in magnitude are found. If sigma is zero, the eigenvalues smallest in magnitude are found. A second matrix, B, may be included for the generalized eigenvalue problem

The statement

finds the k largest singular values of A and

finds the k smallest singular values.

For example, the statements

set up the five-point Laplacian difference operator on a 65-by-65 grid in an L-shaped, two-dimensional domain. The statements

show that A is a matrix of order 2945 with 14,473 nonzero elements.

The statement

computes the smallest eigenvalue and eigenvector. Finally,

distributes the components of the eigenvector over the appropriate grid points and produces a contour plot of the result.

contour plot of the result


Previous page  Simultaneous Linear Equations Selected Bibliography Next page

© 1994-2005 The MathWorks, Inc.