[BACK]Return to fit.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Diff for /OpenXM_contrib/gnuplot/Attic/fit.c between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:15:57 version 1.1.1.3, 2003/09/15 07:09:24
Line 2 
Line 2 
 static char *RCSid = "$Id$";  static char *RCSid = "$Id$";
 #endif  #endif
   
   /*  NOTICE: Change of Copyright Status
    *
    *  The author of this module, Carsten Grammes, has expressed in
    *  personal email that he has no more interest in this code, and
    *  doesn't claim any copyright. He has agreed to put this module
    *  into the public domain.
    *
    *  Lars Hecking  15-02-1999
    */
   
 /*  /*
  *    Nonlinear least squares fit according to the   *    Nonlinear least squares fit according to the
  *      Marquardt-Levenberg-algorithm   *      Marquardt-Levenberg-algorithm
Line 609  static TBOOLEAN fit_interrupt()
Line 619  static TBOOLEAN fit_interrupt()
     frame routine for the marquardt-fit      frame routine for the marquardt-fit
 *****************************************************************/  *****************************************************************/
 static TBOOLEAN regress(a)  static TBOOLEAN regress(a)
 double a[];      double a[];
 {  {
     double **covar, *dpar, **C, chisq, last_chisq, lambda;      double **covar, *dpar, **C, chisq, last_chisq, lambda;
     int iter, i, j;      int iter, i, j;
Line 625  double a[];
Line 635  double a[];
   
     /* Initialize internal variables and 1st chi-square check */      /* Initialize internal variables and 1st chi-square check */
     if ((res = marquardt(a, C, &chisq, &lambda)) == ERROR)      if ((res = marquardt(a, C, &chisq, &lambda)) == ERROR)
         Eex("FIT: error occured during fit");          Eex("FIT: error occurred during fit");
     res = BETTER;      res = BETTER;
   
     show_fit(iter, chisq, chisq, a, lambda, STANDARD);      show_fit(iter, chisq, chisq, a, lambda, STANDARD);
Line 705  double a[];
Line 715  double a[];
     }      }
   
     if (res == ERROR)      if (res == ERROR)
         Eex("FIT: error occured during fit");          Eex("FIT: error occurred during fit");
   
     /* compute errors in the parameters */      /* compute errors in the parameters */
   
Line 1330  void do_fit()
Line 1340  void do_fit()
         else {          else {
             /* 2D fit, 2 ranges: second range is for *z*, not y: */              /* 2D fit, 2 ranges: second range is for *z*, not y: */
             autorange_z = autorange_y;              autorange_z = autorange_y;
             if (autorange_y & 1)              /* HBB 20010926: Bug fixed. Checks were the wrong way round */
               if (! (autorange_y & 1))
                 min_z = min_y;                  min_z = min_y;
             if (autorange_y & 2)              if (! (autorange_y & 2))
                 max_z = max_y;                  max_z = max_y;
         }          }
     }      }

Legend:
Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>