selectfit displays the fit specified in a dialog box for the data
selected from the active curve by drawing a polygon, and repeats the
procedure until an empty polygon is drawn. Use the left mouse button to
draw the polygon. Double click or right-click to close the polygon. The
last trial remains displayed. Use undofit or rmfit to remove the fit.
The display settings are defined in the file fitparam.
By default, the first curve in the active figure is used (see fitparam
to change this default behavior). To fit another curve, select it
before calling selectfit.
selectfit(FUN) specifies the fitting string FUN. FUN may be either a
default fit (eg, 'exp', 'power'), a user-defined fit (see editfit),
or directly a fit equation (eg, 'c+a*exp(-x/x0)'). See fit for the
syntax of FUN. FUN may also be any valid interpolation method string
(eg 'spline', 'cubic'... excepted 'linear'). See INTERP1 for the valid
interpolation methods.
selectfit(F) use the equation defined in the fit structure F.
F = selectfit(...) does the same, and also return the fit structure F.
F has the same content as the fit structure returned by fit (see fit
for details), and also contains a handle to the equation box and to the
curve.
Note that if the option 'lin' or 'log' is not specified in the string
FUN, selectfit checks the Y-scale of the current figure to determine
whether Y or LOG(Y) has to be fitted.
Examples:
plotsample('power');
selectfit('power; log');
plotsample('poly2');
f = selectfit('z(v) = poly3');
editcoeff(f);
See Also
showfit, fit, undofit, rmfit, plotsample, selectdata, INTERP1.