15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sparse Matrix Operations<br />

preordering, is performed before the factorization <strong>of</strong> A. In some cases, you might<br />

be able to provide a better preordering than the one used by the backslash<br />

algorithm.<br />

To use a different preordering, first turn <strong>of</strong>f both <strong>of</strong> the automatic preorderings<br />

that backslash might perform by default, using the function spparms as follows:<br />

spparms('autoamd',0);<br />

spparms('autommd',0);<br />

Now, assuming you have created a permutation vector p that specifies a<br />

preordering <strong>of</strong> the indices <strong>of</strong> A, apply backslash to the matrix A(:,p), whose<br />

columns are the columns <strong>of</strong> A, permuted according to the vector p.<br />

x = A (:,p) \ b;<br />

x(p) = x;<br />

spparms('autoamd',1);<br />

spparms('autommd',1);<br />

The commands spparms('autoamd',1) and spparms('autommd',1) turns the<br />

automatic preordering back on, in case you use A\b later without specifying an<br />

appropriate preordering.<br />

Iterative Methods<br />

Nine functions are available that implement iterative methods for sparse<br />

systems <strong>of</strong> simultaneous linear systems.<br />

Functions for Iterative Methods for Sparse Systems<br />

Function<br />

bicg<br />

bicgstab<br />

cgs<br />

gmres<br />

lsqr<br />

minres<br />

pcg<br />

Method<br />

Biconjugate gradient<br />

Biconjugate gradient stabilized<br />

Conjugate gradient squared<br />

Generalized minimum residual<br />

Least squares<br />

Minimum residual<br />

Preconditioned conjugate gradient<br />

6-37

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

Saved successfully!

Ooh no, something went wrong!