Curve fitting subrange of data

Hello,

I have written a function that does what I want but have ran into difficulties with the curve fitting part of the script.

I would like to fit to the subrange : more_than_zero[index] and max_current[index] ---- how do I properly format this in the CurveFit function?



for(index=0; index
Please read through the sub-section of the CurveFit reference documentation, "Wave Subrange Details". Basically, it sounds like you are trying to fit yWave[more_than_zero[index], max_current[index]. If you also want the same subrange out of xWave, that's all you need to do:
CurveFit /TBOX=256 line yWave[More_than_zero[index], max_current[index]] /X= xWave /D

If you want different subranges (such as might occur if you want the Y data to be one column of a multi-column wave, and the X data from another column) then you need to specify a subrange on each wave.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com