next up previous contents
Next: Finding the Solution to Up: Fitting a Straight Line Previous: Hints and Tips

Possible Extension

Add an error to the points i.e. the data is now (x,y,dy) so that the RMS can be converted to a chi-squared and errors can be given on the fitted numbers.

Extend the program to do fit to a polynomial up to some limit (say 10) and allow the user to specify the power. Alternatively, the program could try all constrained fits automatically and suggest the best fit. This cannot simply be the one with lowest RMS - each new term should significantly improve chi-squared per degree of freedom. See section 20.7 for a little theory regarding the fitting of analytical functions.



n west (APC)
2000-03-08