A basic chebyshev fit function

A basic fit function for fitting any type of curve (interpolation) using Chebyshev polynomials.
Gencurvefit is very useful for fitting with this kind of problem.
You can use more or less terms by using more parameters in the fit wave (w).
1 parameter would fit a constant
2 parameters would fit a straight line
3 parameters would fit a quadratic, etc.

The entire X-range is rescaled to between -1 and 1 during the fit. Note that the fit parameters will only be applicable to this scaled range, if you increase the size of the x range then the best fit parameters will change.

Use cheby_guess_params to find an initial set of fitting parameters. These will be the fitted parameters if there is no error weighting.

EDITED 24/Sep/2014
Use the code at http://www.igorexchange.com/project/chebyshev

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More