CHOLESKY.OMS
Script File:
# Description:
# Computes the Cholesky factorization of a matrix.
#
clear
#
# matrix we are factoring
B = {[2., 1.], [1., 2.] }
# cholesky factor
C = cholesky(B)
#
print "B =", B
print "C =", C
print "C' * C =", C' * C
Output:
B = {
[ 2 , 1 ]
[ 1 , 2 ]
}
C = {
[ 1.41421 , 0.707107 ]
[ 0 , 1.22474 ]
}
C' * C = {
[ 2 , 1 ]
[ 1 , 2 ]
}