chol

Cholesky decomposition.

Syntax

R = chol(A)

[R,p] = chol(A,'upper')

[L,p] = chol(A,'lower')

Inputs

A
The symmetric positive definite matrix to decompose.
Type: double
Dimension: matrix

Outputs

R
The upper triangular matrix.
L
The lower triangular matrix.
p
Success/Fail flag.

Example

chol([1,2,3;2,20,26;3,26,70])
R = [Matrix] 3 x 3
1 2 3
0 4 5
0 0 6