Código simple de descomposición de valor singular en C
-
15-11-2019 - |
Pregunta
Estoy buscando un código de descomposición de valor singular (SVD) en C, ¿podría ayudarme?
Encontré muchas fuentes, pero no puedo ejecutarlas, estoy buscando un código SVD de la versión que proporciona 3 matriz de S, V y U para mí.
Solución
You can use the Numerical recipies code for that svdcmp.c reference. Actually in my case I found more accurate the openCV one, but both work fine.
Otros consejos
Don't write it yourself, don't deal with trying to build someone else's source. Use a library that provides this function for you. There's probably already one available on your target platform.
Specifically, use the industry-standard LAPACK library or use the GSL or whatever other linear algebra library you want. They all have an SVD implementation.