UnderGround Forums
 

AcademicGround >> Free curve-fitting software?


3/7/07 3:11 PM
Ignore | Quote | Vote Down | Vote Up
FlashGordon2002
Send Private Message Add Comment To Profile

Edited: 07-Mar-07
Member Since: 05/23/2002
Posts: 11324
 
I need to fit some data - data has multiple (wide peaks) riding on top of a backgroundw which can probably be fitted to a polynomial. Ideally, I'm looking for software that'll let me input the form of the background and each of the peaks I want fitted with initial parameters and then regress towards a best fit.
3/7/07 7:01 PM
Ignore | Quote | Vote Down | Vote Up
asdf
5 The total sum of your votes up and votes down Send Private Message Add Comment To Profile

Edited: 07-Mar-07
Member Since: 01/01/2001
Posts: 11276
gnuplot
3/13/07 10:40 AM
Ignore | Quote | Vote Down | Vote Up
FlashGordon2002
Send Private Message Add Comment To Profile

Edited: 13-Mar-07
Member Since: 05/23/2002
Posts: 11385
Does gnuplot have a curve fitting function?
4/7/07 10:33 PM
Ignore | Quote | Vote Down | Vote Up
asdf
5 The total sum of your votes up and votes down Send Private Message Add Comment To Profile

Edited: 07-Apr-07
Member Since: 01/01/2001
Posts: 11594
http://www.duke.edu/~hpgavin/gnuplot.html 7. CURVE-FITTING WITH GNUPLOT To fit the data in force.dat with a function use the commands: f1(x) = a1*tanh(x/b1) # define the function to be fit a1 = 300; b1 = 0.005; # initial guess for a1 and b1 fit f1(x) 'force.dat' using 1:2 via a1, b1 Final set of parameters Asymptotic Standard Error ======================= ========================== a1 = 308.687 +/- 10.62 (3.442%) b1 = 0.00226668 +/- 0.0002619 (11.55%) and the commands: f2(x) = a2 * tanh(x/b2) # define the function to be fit a2 = 300; b2 = 0.005; # initial guess for a and b fit f2(x) 'force.dat' using 1:3 via a2, b2 Final set of parameters Asymptotic Standard Error ======================= ========================== a2 = 259.891 +/- 12.82 (4.933%) b2 = 0.00415497 +/- 0.0004297 (10.34%) The curve-fit and data may now be plotted with the commands: set key 0.018,150 title "F(x) = A tanh (x/B)" # title to key! set title "Force Deflection Data \n and curve fit" # note newline! set pointsize 1.5 # larger point! set xlabel 'Deflection, {/Symbol D}_x (m)' # Greek symbols! set ylabel 'Force, {/Times-Italic F}_A, (kN)' # italics! plot "force.dat" using 1:2 title 'Column data' with points 3, \ "force.dat" using 1:3 title 'Beam data' with points 4, \ a1 * tanh( x / b1 ) title 'Column-fit: A=309, B=0.00227', \ a2 * tanh( x / b2 ) title 'Beam-fit: A=260, B=0.00415'

Reply Post

You must log in to post a reply. Click here to login.