What's wrong is that your fitting problem is in bad shape, and reading the documentation about the fit command, particularly "help fit tips", would have told you what's bad about it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
# inline data$data<<EOD5.19e+147.91e-145.49e+148.56e-146.88e+141.67e-137.40e+141.96e-138.21e+142.40e-13EODf(x)=a*x+b# best option: do not use a non-linear fitting tool for a linear fit,# use 'stats' instead:stats$datausing1:2a=STATS_slopeb=STATS_intercept# or, if you insist on 'fit':# Do set start-up values! The order of magnitude is important.# Otherwise gnuplot will assume start-up values of 1, which is way off.a=1e-28b=-1e-13fitf(x)$datausing1:2viaa,bsetkeybottomsetformaty"%h"plot\
$datat"measured",\
STATS_slope*x+STATS_interceptt"stats result",\
f(x)t"fit result"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey!
I'm trying to fit a function in the form of
f(x)=a*x+bto these measurements:However, after
fit f(x) measured.csv using 1:2 via a,b, gnuplot returns..., which is a line thats rising far, far to fast.
Any idea what's wrong?
Thanks in advance!
What's wrong is that your fitting problem is in bad shape, and reading the documentation about the fit command, particularly "help fit tips", would have told you what's bad about it.