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.

6 Sparse Matrices<br />

shows that A has 1887 nonzeros, its complete LU factorization has 16777<br />

nonzeros, its incomplete LU factorization with a drop tolerance <strong>of</strong> 1e-6 has<br />

10311 nonzeros, and its lu('0') factorization has 1886 nonzeros.<br />

The luinc function has a few other options. See the luinc reference page for<br />

details.<br />

The cholinc function provides drop tolerance and level 0 fill-in Cholesky<br />

factorizations <strong>of</strong> symmetric, positive definite sparse matrices. See the cholinc<br />

reference page for more information.<br />

Simultaneous Linear Equations<br />

There are two different classes <strong>of</strong> methods for solving systems <strong>of</strong> simultaneous<br />

linear equations:<br />

• Direct methods are usually variants <strong>of</strong> Gaussian elimination. These methods<br />

involve the individual matrix elements directly, through matrix<br />

factorizations such as LU or Cholesky factorization. <strong>MATLAB</strong> implements<br />

direct methods through the matrix division operators / and \, which you can<br />

use to solve linear systems.<br />

• Iterative methods produce only an approximate solution after a finite number<br />

<strong>of</strong> steps. These methods involve the coefficient matrix only indirectly,<br />

through a matrix-vector product or an abstract linear operator. Iterative<br />

methods are usually applied only to sparse matrices.<br />

Direct Methods<br />

Direct methods are usually faster and more generally applicable than indirect<br />

methods, if there is enough storage available to carry them out. Iterative<br />

methods are usually applicable to restricted cases <strong>of</strong> equations and depend<br />

upon properties like diagonal dominance or the existence <strong>of</strong> an underlying<br />

differential operator. Direct methods are implemented in the core <strong>of</strong> <strong>MATLAB</strong><br />

and are made as efficient as possible for general classes <strong>of</strong> matrices. Iterative<br />

methods are usually implemented in <strong>MATLAB</strong> M-files and may make use <strong>of</strong><br />

the direct solution <strong>of</strong> subproblems or preconditioners.<br />

Using a Different Preordering. If A is not diagonal, banded, triangular, or a<br />

permutation <strong>of</strong> a triangular matrix, backslash (\) reorders the indices <strong>of</strong> A to<br />

reduce the amount <strong>of</strong> fill-in — that is, the number <strong>of</strong> nonzero entries that are<br />

added to the sparse factorization matrices. The new ordering, called a<br />

6-36

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

Saved successfully!

Ooh no, something went wrong!