Linear fit and subtract


Lin. Subtr.

This object performs a linear least-squares fit of the input data vector. The data is fitted with a polynomial whose degree is specified in the property dialog.

On output, the variable "Fitted" contains the data points calculated out of the fit parameters, "Subtracted" contains the difference between the original function and the fittet function, and "Parameters" are the polynomial coefficients. To calculate the fit function out of the parameter array use the formula

parameter[0] + parameter[1] * x + parameter[2] * x * x ...

The fit routine uses a gauss-jordan elimination function (function gaussj), which is taken from the book "Numerical Recipes in C, The Art of Scientific Computing" by William H. Press, Cambridge University Press, ISBN 0-521-43108-5. The code is Copyright (C) Numerical Recipes Software 1987, 1988, 1992, 1997, 2002.


The Vimms User Manual