#1




choldc  finding inverse of Cholesky decomposition
Hello
I need to find L1 from the Cholesky decompostion A = L . Ltranspose and have implemented choldc from nr2 in C with additional lines to find inverse as given in chapter 2.9. I have calculated L(L1) as a test and do not get the identity matrix, I was just wondering whether anyone else had encountered this problem... or could point out if I'm being stupid and missing something? Thanks jbd 
#2




Is it a multiplechoice test?
But seriously, what did you use as a test case? How did you get all of the elements of the calculated matrix L and Linverse from the return values of choldc? How close did the answer come to expected? Using choldc (single precision floating point) from nr2 C, here is some output from a matrix used as a test case in xcholdc, where I have added the stuff that I think you are asking about: Code:
Original matrix: 100.000000 15.000000 0.010000 15.000000 2.300000 0.010000 0.010000 0.010000 1.000000 After choldc, diagonal elements of L and LTranspose are in [p]: 10.000000 0.223607 0.999277 Upper of [a] contains the upper of the original matrix. Below main diagonal of [a] is below main diagonal of L: 100.000000 15.000000 0.010000 1.500000 2.300000 0.010000 0.001000 0.038013 1.000000 Extracting L and LTranspose from [p] and lower [a]: L: 10.000000 0.000000 0.000000 1.500000 0.223607 0.000000 0.001000 0.038013 0.999277 LTranspose: 10.000000 1.500000 0.001000 0.000000 0.223607 0.038013 0.000000 0.000000 0.999277 Product of L and LTranspose should be equal to original: 100.000000 15.000000 0.010000 15.000000 2.300000 0.010000 0.010000 0.010000 1.000000 Inverse of L from code at end of section 2.9: 0.100000 0.000000 0.000000 0.670821 4.472138 0.000000 0.025418 0.170123 1.000724 Product of L and Inverse of L: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 Dave 
Thread Tools  
Display Modes  

