#include "machdefs.h" #include "peida.h" #include "linfit.h" #include "matrix.h" #include "cvector.h" double LinFit(const OVector& x, const OVector& y, int nf, double (*f)(int, double), OVector& c) { int n = x.NElts(); if (n != y.NElts()) THROW(sizeMismatchErr); OMatrix fx(nf, n); for (int i=0; i