cholesky

Syntax

cholesky(obj, [lower=true])

Arguments

obj is a symmetric positive definite matrix.

lower is a Boolean value indicating whether the result is a lower triangular matrix (true) or an upper triangular matrix (false). The default value is true.

Details

Conduct Cholesky decomposition of a symmetric positive-definite matrix.

Examples

$ m=[1, 0, 1, 0, 2, 0, 1, 0, 3]$3:3
$ L=cholesky(m);
$ L;

#0

#1

#2

1

0 96.56

0

0

1.414214

0

1

0

1.414214

$ L**transpose(L);

#0

#1

#2

1

0

1

0

2

0

1

0

3

$ cholesky(m, false);

#0

#1

#2

1

0

1

0

1.414214

0

0

0

1.414214