Function Reference
— Loadable Function: r = chol (a)
— Loadable Function: [r, p] = chol (a)
— Loadable Function: [r, p, q] = chol (s)
— Loadable Function: [r, p, q] = chol (s, 'vector')
— Loadable Function: [l, ...] = chol (..., 'lower')

Compute the Cholesky factor, r, of the symmetric positive definite matrix a, where

Called with one output argument chol fails if a or s is not positive definite. With two or more output arguments p flags whether the matrix was positive definite and chol does not fail. A zero value indicated that the matrix was positive definite and the r gives the factorization, annd p will have a positive value otherwise.

If called with 3 outputs then a sparsity preserving row/column permutation is applied to a prior to the factorization. That is r is the factorization of a(q,q) such that

The sparsity preserving permutation is generally returned as a matrix. However, given the flag 'vector', q will be returned as a vector such that

Called with either a sparse or full matrix and uing the 'lower' flag, chol returns the lower triangular factorization such that

In general the lower trinagular factorization is significantly faster for sparse matrices.

See also: cholinv chol2inv