Curve fitting function
tooprock
I am trying to use the fitting option of Igor Pro. I have three graphs and want to apply an easy line curve fitting to each of those graphs. However, since two of the curves have the same waves, Igor creates a wave named fit_*. I am trying to use /D[=destwaveName ] to save the results as a separate wave. Here is the code I use:
Display F1_W vs F2_W // F1_W and F2_W are waves containing real numbers
ModifyGraph mode=3,marker=19,msize=1.1,rgb=(19456,39168,0)
ModifyGraph mirror=3, standoff=0
Make/N=2 fit_F1F2
CurveFit/NTHR=0 line F1_W /X=F2_W /D=fit_F1F2
Does anyone know how to use /D line for this purpose?
Thanks,
Emre
So your code might be modified like this:
ModifyGraph mode=3,marker=19,msize=1.1,rgb=(19456,39168,0)
ModifyGraph mirror=3, standoff=0
Duplicate F1_W, fit_F1F2
AppendToGraph fit_F1F2 vs F2_W
CurveFit/NTHR=0 line F1_W /X=F2_W /D=fit_F1F2
Another option would be to simply rename the automatically-created fit wave:
ModifyGraph mode=3,marker=19,msize=1.1,rgb=(19456,39168,0)
ModifyGraph mirror=3, standoff=0
CurveFit/NTHR=0 line F1_W /X=F2_W /D
Wave fit_F1_W
Rename fit_F1_W, fit_F1F2
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 18, 2012 at 09:18 am - Permalink
Best,
Emre
October 22, 2012 at 01:49 am - Permalink