Codice semplice di decomposizione del valore singolare in c
-
15-11-2019 - |
Domanda
Sto cercando un codice di decomposizione del valore singolare (SVD) in C, vorresti aiutarmi?
Ho trovato molte fonti ma non riesco a correre, sto cercando un codice SVD di versione che fornisce 3 matrice di S, V e U per me.
Soluzione
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.
Altri suggerimenti
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.