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

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

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

chol<br />

2chol<br />

Purpose Cholesky factorization<br />

Syntax R = chol(X)<br />

[R,p] = chol(X)<br />

Description The chol function uses only the diagonal and upper triangle of X. The lower<br />

triangular is assumed to be the (complex conjugate) transpose of the upper.<br />

That is, X is Hermitian.<br />

2-246<br />

R = chol(X), where X is positive definite produces an upper triangular R so<br />

that R'*R = X. If X is not positive definite, an error message is printed.<br />

[R,p] = chol(X), with two output arguments, never produces an error<br />

message. If X is positive definite, then p is 0 and R is the same as above. If X is<br />

not positive definite, then p is a positive integer and R is an upper triangular<br />

matrix of order q = p-1 so that R'*R = X(1:q,1:q).<br />

Examples The binomial coefficients arranged in a symmetric array create an interesting<br />

positive definite matrix.<br />

n = 5;<br />

X = pascal(n)<br />

X =<br />

1 1 1 1 1<br />

1 2 3 4 5<br />

1 3 6 10 15<br />

1 4 10 20 35<br />

1 5 15 35 70<br />

It is interesting because its Cholesky factor consists of the same coefficients,<br />

arranged in an upper triangular matrix.<br />

R = chol(X)<br />

R =<br />

1 1 1 1 1<br />

0 1 2 3 4<br />

0 0 1 3 6<br />

0 0 0 1 4<br />

0 0 0 0 1

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

Saved successfully!

Ooh no, something went wrong!