fprintf('Cholesky decomposition\n');

M = [ 4, -2, -2; ...
     -2,  2,  0; ...
     -2,  0,  3 ];

U = chol(M);
U

U'*U

b = [ 4; 2; -7 ];
y = U'\b;
x = U\y;

x
