تحلل القيمة المفرد رمز بسيط في ج
-
15-11-2019 - |
سؤال
أنا أبحث عن رمز تحلل القيمة المفرد (SVD) في C، هل يمكنك مساعدتي؟
لقد وجدت العديد من المصادر ولكن لا يمكنني تشغيلها، أبحث عن رمز إصدار 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.
لا تنتمي إلى StackOverflow