Пример #1
0
 public static bool plotFunction(FN_1 fn, string sFilename, double x1, double x2, int nPoints)
 {
     double[] ar = new double[nPoints];
     for (int i = 0; i < nPoints; i++)
     {
         ar[i] = fn((((double)i) / nPoints) * (x2 - x1) + x1);
     }
     return(plotArray(ar, sFilename));
 }
 public static bool plotFunction(FN_1 fn, string sFilename, double x1, double x2, int nPoints)
 {
     double[] ar = new double[nPoints];
     for (int i = 0; i < nPoints; i++)
     {
         ar[i] = fn( (((double)i)/nPoints)* (x2-x1) + x1 );
     }
     return plotArray(ar, sFilename);
 }