A basic chebyshev fit function
Fri, 10/01/2010 - 12:29 am
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.
Use the code at http://www.igorexchange.com/project/chebyshev
Igor Pro 8
Igor XOP Toolkit
Igor NIDAQ Tools MX