我正在寻找c中的奇异值分解(svd)代码,你会帮我吗?

我发现了许多来源,但我无法运行它们,我正在寻找一个版本的SVD代码,提供3个矩阵的S,V和U。

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top