/* linear least squares, rank = llsq( x, y, m, c, n) Determines n coefficients c such that y ~= c0 + c1*x + c2*x*x + c3*x*x*x + ... Solves the equation U'c = y for c using SVD, where U' is the m-by-n matrix evaluated at the m x values: 1 x0 x0*x0 x0*x0*x0 ... U' = 1 x1 x1*x1 x1*x1*x1 ... 1 x2 x2*x2 x2*x2*x2 ... ... */ int llsq( double x[], double y[], int m, double c[], int n);