=================================================================== RCS file: /home/cvs/OpenXM_contrib/gnuplot/Attic/fit.c,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- OpenXM_contrib/gnuplot/Attic/fit.c 2000/01/22 14:15:57 1.1.1.2 +++ OpenXM_contrib/gnuplot/Attic/fit.c 2003/09/15 07:09:24 1.1.1.3 @@ -1,7 +1,17 @@ #ifndef lint -static char *RCSid = "$Id: fit.c,v 1.1.1.2 2000/01/22 14:15:57 maekawa Exp $"; +static char *RCSid = "$Id: fit.c,v 1.1.1.3 2003/09/15 07:09:24 ohara Exp $"; #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 * Marquardt-Levenberg-algorithm @@ -609,7 +619,7 @@ static TBOOLEAN fit_interrupt() frame routine for the marquardt-fit *****************************************************************/ static TBOOLEAN regress(a) -double a[]; + double a[]; { double **covar, *dpar, **C, chisq, last_chisq, lambda; int iter, i, j; @@ -625,7 +635,7 @@ double a[]; /* Initialize internal variables and 1st chi-square check */ if ((res = marquardt(a, C, &chisq, &lambda)) == ERROR) - Eex("FIT: error occured during fit"); + Eex("FIT: error occurred during fit"); res = BETTER; show_fit(iter, chisq, chisq, a, lambda, STANDARD); @@ -705,7 +715,7 @@ double a[]; } if (res == ERROR) - Eex("FIT: error occured during fit"); + Eex("FIT: error occurred during fit"); /* compute errors in the parameters */ @@ -1330,9 +1340,10 @@ void do_fit() else { /* 2D fit, 2 ranges: second range is for *z*, not 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; - if (autorange_y & 2) + if (! (autorange_y & 2)) max_z = max_y; } }