Singular Value Decomposition in Visual Basic
smkauffman
11-01-2002, 01:40 AM
I've had some sucess in translating a few of the NR in C to Visual Basic so I can use them in excel, however I've had no sucess with the singular value decomposition routine svdcmp in chapter 2 page 67. C is not my strong point, but it seems to me that I've made nearly a line for line translation. The output however certainly is not the svd. Anyone have any sucess with this?
smkauffman
11-02-2002, 10:27 PM
As it would happen I failed to comprehend the meaning of initializing expression in C for loops and have corrected the problem. At least I obtain correct results for the identity matrix. If anyone is interested I'v attached the text of the visual basic code.
Bill Press
11-02-2002, 10:51 PM
Unfortunately, smkauffman, there is a copyright problem with posting translations of NR code on the forum, so our administrator has had to disable your attachment.
If any users want to ask you for the code privately, we'll definitely forward their emails to you if they direct their request to nr (at) nr.com.
By the way, the NR Code CDROM contains SVD in both TruBASIC and MSBASIC. Neither of these are exactly Visual Basic, but they might be of some help.
Cheers,
Bill P.
smkauffman
11-02-2002, 11:16 PM
Sorry about that, I didn't realize. Just as well though I found it still needed some work.