1
2
3
4
5
6
7
8
9
10
11
12
13
|
//clc()
A = [6,15,55;15,55,225;55,225,979];
sl = 0
l11 = (det(A(1,1)))^(1/2);
//for second row
l21 = (det(A(2,1)))/l11;
l22 = (det(A(2,2)) - l21^2)^(0.5);
//for third row
l31 = (det(A(3,1)))/l11;
l32 = (det(A(3,2)) - l21*l31)/l22;
l33 = (det(A(3,3)) - l31^2 - l32^2)^(0.5);
L = [l11,0,0;l21,l22,0;l31,l32,l33];
disp(L,"L = ")
|