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