using System; using static System.Console; using static System.Math; class main{ public static double fun_to_fit(double x){return 1+2*x+3*x*x;} public static double Fc(Func[] fs,vector c,double x){ double s=0; for(int i=0;i[] { z => 1.0, z => z, z => z*z }; (vector c, matrix S) = matlib.lsfit(fs,x,y,dy); var dc = new vector(fs.Length); for(int i=0;i