On 5 Nov 2006 17:35:14 -0800, in comp.lang.c , "eyh5@ece.cornell.edu"
<eyh5@ece.cornell.eduwrote:
Quote:
>Hi,
>
I'm wondering where I may get the C source code for a
>linear-algebraic technique known as the singular value decomposition
>(SVD).
Either
www.google.com or by writing it yourself.
I'm afraid this isn't comp.sources.wanted. The normal method is thus
to ask in comp.programming for hints about the algorithm, then ask in
CLC for help debugging your C implementaiton of the algo.
Quote:
I found the code (a function called svdcmp) from Numerical Recipes
>in C (by Press, Teukolskyk, Vetterling, and Flannery). However, it
>always yields a wrong n-by-n V matrix after decomposing the original
>m-by-n matrix A. I am beginning to suspect that the svdcmp provided in
>that book is itself errorneous.
I doubt that. The C code in NRIC is however seriously weird, since it
was translated badly from Fortran. You're quite probably calling it
wrong....
--
Mark McIntyre
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan