Saving the Fit data


While running a fit function repeatedly on subsets of a dataset, the fit curve is shown only on the last subset of the data because everytime the fit values are updated. How do I make sure every fit is saved and displayed?

TIA !
You need to re-name the fit curve after each fit. Something like this (I wrote this right here, and it is not tested or even compiled):
Variable i=0
String ydataname = NameOfWave(ydatawave)
do
    FuncFit ...
    String newname = "fit_"+ydataname+num2str(i)
    Wave w = $newname
    if (WaveExists(w))
        Duplicate/O $("fit_"+ydataname), $(newname)
    else
        Rename $("fit_"+ydataname), $(newname)
    endif
    i += 1
while(no more fits to do)


John Weeks
WaveMetrics, Inc.
support@wavemetrics.com