>> k = [2 3 6;9 6 5;8 9 3]
k =
2 3 6
9 6 5
8 9 3
>> [l,d] = ldl(k)
l =
1.5000 1.0000 0
1.0000 0 0
1.5000 0.4783 1.0000
d =
6.0000 0 0
0 -11.5000 0
0 0 -7.8696
[L,D]=ldl(K);