Solves linear system using singular value backsubstitution.
int ocmath_ex_svbksb( double ** ppu, double * pw, double ** ppv, int m, int n, double * pb, double * px )
Returns 0 if OK, 1 if any error, for example, the values of the vector W
are so small (by absolute value) that they cannot be divided with.
EX1
void ocmath_ex_svbksb_ex1() { double dArray1[4]={2,3,5,7}; double dArray2[4]={11,13,17,19}; double dArray3[4]={23,29,31,37}; double *dArrayTest1[3]; int m = 3; int n = 4; dArrayTest1[0]= dArray1; dArrayTest1[1]= dArray2; dArrayTest1[2]= dArray3; double dArray4[4]={2,3,5,7}; double dArray5[4]={11,13,17,19}; double dArray6[4]={23,29,31,37}; double dArray7[4]={41,43,47,49}; double *dArrayTest2[4]; dArrayTest2[0]=dArray4; dArrayTest2[1]=dArray5; dArrayTest2[2]=dArray6; dArrayTest2[3]=dArray7; vector vW={1,2,3,4}; vector vb={1,2,3}; vector vx; vx.SetSize(n); int iRet = ocmath_ex_svbksb(dArrayTest1,vW,dArrayTest2,m,n,vb,vx); }
origin.h