|
From: Eckard S. <sp...@hy...> - 2005-06-17 09:06:10
|
Hi@all, I'm not sure if my fit problem with gnuplot is an old hat. I have built a site that helps students to get results from physical experiments by the help of gnuplot. All is well but for a simple linear fit I get wrong parameters. My data are: 6.03e5 0.4 6.79e5 0.45 7.54e5 0.5 8.30e5 0.55 9.05e5 0.6 9.81e5 0.65 which are stored in a file 'lreg3.dat'. My gnuplot commands are: f(x) = a*x+b fit f(x) 'lreg3.dat' via a,b plot f(x), 'lreg3.dat' gnuplot comes up with a totally wrong regression line (i.e. a negative slope). If one scratches one data pair from list, the result is correct. I have read in 'help fit' that this misfit can occur if the magnitudes of both parameters a, b differ too much. This may be the case here. But a simple linear fit should always work. Or not? Is it true that the Marquardt-Levenberg algorithm is used for all fits? Must I provide 'good' starting values for a, b to get a correct result? This would be very inconvenient here. Thank you very much for your help/comments. Regards, -Eckard |