감동, 마음이 움직이는 것

[gnuplot] print fitting parameter 본문

Tips (Utility, Computer Language, and etc.)

[gnuplot] print fitting parameter

Struggler J. 2016. 9. 20. 20:21

For fitting using gnuplot: http://gnuplot.sourceforge.net/docs_4.2/node82.html

Print fitting parameter:

http://stackoverflow.com/questions/6593134/gnuplot-printing-fit-parameters-automatically

http://gnuplot.sourceforge.net/demo/fit.html



sprintf and print functions are in gunplot.


a=1
b=1
f(x) = a*x + b
ti = sprintf("%.2fx+%.2f", a, b)
fit f(x) 'data' using 1:2 via a, b
plot [0:3] f(x) t ti, "data" w l
print ti