FUNCTION REFERENCE
chol
Cholesky factorization of a symmetric positive definite matrix.
Cholesky factorization of a symmetric positive definite matrix.
Syntax
R = chol(A)Syntax
R = chol(A, 'lower')Syntax
[R, p] = chol(A)R'*R = A with R upper triangular, reading only the upper triangle of A.
'lower' returns L with L*L' = A from the lower triangle. With a second
output a failure does not raise an error: p is 0 on success, otherwise
the order of the failing leading minor and R is the factor of the
(p-1)-by-(p-1) leading block.
Example
R = chol([4 2; 2 3]) % R = [2 1; 0 1.4142]Differences from MATLAB: the 'vector' form and sparse input are not
supported. Complex input reads only the upper triangle (or the lower one for
'lower') and needs a real diagonal; a factor whose imaginary parts are all
zero is real.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.