23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

cholinc<br />

Examples Example 1.<br />

2-250<br />

gets rid of the symptoms of the problem, but it does not solve it. The<br />

preconditioner may not be singular, but it probably is not useful, and a warning<br />

message is printed.<br />

The Cholesky-Infinity factorization is meant to be used within interior-point<br />

methods. Otherwise, its use is not recommended.<br />

Start with a symmetric positive definite matrix, S.<br />

S = delsq(numgrid('C',15));<br />

S is the two-dimensional, five-point discrete negative Lapacian on the grid<br />

generated by numgrid('C',15).<br />

Compute the Cholesky factorization and the incomplete Cholesky factorization<br />

of level 0 to compare the fill-in. Make S singular by zeroing out a diagonal entry<br />

and compute the (partial) incomplete Cholesky factorization of level 0.<br />

C = chol(S);<br />

R0 = cholinc(S,'0');<br />

S2 = S; S2(101,101) = 0;<br />

[R,p] = cholinc(S2,'0');<br />

Fill-in occurs within the bands of S in the complete Cholesky factor, but none<br />

in the incomplete Cholesky factor. The incomplete factorization of the singular<br />

S2 stopped at row p = 101 resulting in a 100-by-139 partial factor.<br />

D1 = (R0'*R0).*spones(S)-S;<br />

D2 = (R'*R).*spones(S2)-S2;<br />

D1 has elements of the order of eps, showing that R0'*R0 agrees with S over its<br />

sparsity pattern. D2 has elements of the order of eps over its first 100 rows and<br />

first 100 columns, D2(1:100,:) and D2(:,1:100).

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

Saved successfully!

Ooh no, something went wrong!