Singular-value decomposition
int ocmath_ex_svdcmp( double ** ppMat, int m, int n, double * pW, double ** ppV )
Returns 0 if OK, otherwise return 1.
EX1
void ocmath_ex_svdcmp_ex1() { double dArray1[3]={2,3,5}; double dArray2[3]={7,11,13}; double *dArrayTest1[2]; int m = 2; int n = 3; dArrayTest1[0]= dArray1; dArrayTest1[1]= dArray2; double dArray3[3]; double dArray4[3]; double dArray5[3]; double *dArrayTest2[3]; dArrayTest2[0]=dArray3; dArrayTest2[1]=dArray4; dArrayTest2[2]=dArray5; vector vW; vW.SetSize(n); int iRet = ocmath_ex_svdcmp(dArrayTest1, m, n, vW,dArrayTest2); }
Singular-value decomposition.
A=U*S*V'
ocmath_svd, ocmath_svd_complex
origin.h