LSqFit (macro)

Performs a nonlinear least squares fit of the active dataset. The fitting function must be previously specified using the NLSF -f (select the fitting function specified by funcName) command. Depending on the type of fit, additional parameters may also need to be specified.


Def  LSqFit {
      nlsf -H %C; nlsf -1; nlsf -2; nlsf -3;
      if (step > 4) (step/=2; nlsf -1; nlsf -2);
      if (step > 1) (step=1; nlsf -2); nlsf -2; nlsf -t;


The following script performs an exponential decay fit (ExpDec1) on the active dataset.

NLSF -f ExpDec1;