15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sparse Matrix Operations<br />

Background information on these iterative methods and incomplete<br />

factorizations is available in [2] and [7].<br />

Eigenvalues and Singular Values<br />

Two functions are available which compute a few specified eigenvalues or<br />

singular values. svds is based on eigs which uses ARPACK [6].<br />

Functions to Compute a Few Eigenvalues or Singular Values<br />

Function<br />

eigs<br />

svds<br />

Description<br />

Few eigenvalues<br />

Few singular values<br />

These functions are most frequently used with sparse matrices, but they can be<br />

used with full matrices or even with linear operators defined by M-files.<br />

The statement<br />

[V,lambda] = eigs(A,k,sigma)<br />

finds the k eigenvalues and corresponding eigenvectors <strong>of</strong> the matrix A which<br />

are nearest the “shift” sigma. If sigma is omitted, the eigenvalues largest in<br />

magnitude are found. If sigma is zero, the eigenvalues smallest in magnitude<br />

are found. A second matrix, B, may be included for the generalized eigenvalue<br />

problem<br />

Av = λBv<br />

The statement<br />

[U,S,V] = svds(A,k)<br />

finds the k largest singular values <strong>of</strong> A and<br />

[U,S,V] = svds(A,k,0)<br />

finds the k smallest singular values.<br />

For example, the statements<br />

L = numgrid('L',65);<br />

A = delsq(L);<br />

6-39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!