showfit displays the fit specified in a dialog box for the active
curve. 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 showfit. Use selectfit to fit only a part of the data
from the selected curve.
showfit(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.
showfit(F) displays the fit F defined from the fit structure returned
by fit. See fit for the definition of F.
F = showfit(...) 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, showfit checks the Y-scale to know if Y or LOG(Y) has to be
fitted.
Examples:
type 'plotsample' and follow the instructions.
plotsample('power');
showfit('c*x^n; log');
plotsample('hist');
f = fit('gauss');
showfit(f);
plotsample('poly2');
f = showfit('z(v) = poly3');
editcoeff(f);
See Also
selectfit, fit, undofit, rmfit, plotsample, pickdata, INTERP1.