svd for small matrices


koan
02-21-2003, 09:20 AM
I am using svdcmp() from NR (C version).

When I try to find the SVD of
-3 3
0 0

I get all nans in the output;
I can't find anything different from my code to the NR version. Octave gives me the SVD.

Is it my code, am I using svdcmp wrong or is there a bug in svdcmp ?

I'm wondering if Octave has a slightly more sophisticated routine that detects "bad cases" like this one and does something different. If this is the case, what can I do about it ?

thanks

koan

Saul Teukolsky
02-23-2003, 03:38 PM
Hi,

Sorry, I'm unable to reproduce your problem. svdcmp.c works fine on your matrix.

Saul Teukolsky