chol
Cholesky factorization of a Hermitian positive-definite matrix.
Syntax
Section titled “Syntax”R = chol(A)R = chol(A, 'lower')[R, p] = chol(A)[R, p, S] = chol(A, 'vector') % sparseDescription
Section titled “Description”Returns the upper-triangular R such that R'*R = A, assuming A is Hermitian positive-definite. Pass 'lower' to return lower-triangular R with R*R' = A.
The optional second output p is 0 if A is positive-definite and a positive integer otherwise, indicating where the factorization failed (the leading minor of order p-1 was not positive-definite). For sparse matrices, the third output is a permutation that improves fill-in.
Examples
Section titled “Examples”A = [4 12 -16; 12 37 -43; -16 -43 98];R = chol(A)norm(R' * R - A) % near-zero