#include "polyfit.h" #include /** Fit an n:th degree polynomial and remove if from data. * Uses discrete orthogonal polynomials for numerical stability. * * Copyright Sören Molander, 2005 * * Feel free to use and modify the program at will. * */ using namespace SIGMOD; using namespace std; int main(int argc, char** argv) { if (argc < 4) { cerr << "#############################"< "< "< cols; cols.clear(); if (argc == 4) { filename = string(argv[1]); order = atoi(argv[2]); col1 = atoi(argv[3]); --col1; // columns are in C-standard, start at 0 cols.push_back(col1); } else if (argc == 5) { filename = string(argv[1]); order = atoi(argv[2]); col1 = atoi(argv[3]); col2 = atoi(argv[4]); --col1;// columns are in C-standard, start at 0 --col2; cols.push_back(col1); cols.push_back(col2); } else { cerr << "Error in argument list, try again"<