Mathematica 9 is now available

Wolfram Library Archive

All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

polyFit[] for Mathematica 5.2

Alessandro Torre
Revision date


polyFit[n, {xdata, errX}, {ydata, errY}, #, opts] finds the polynomial expression of the form y = a + b x + c x^2 + ... that fit best with 'xdata' and 'ydata' (it's a least-squares fit)

'n' is the degree of the polynomial, 'errX' and 'errY' are the errors of 'xdata' and 'ydata' (they're optional)

'#' is the output format (graphical or numerical)

The chief advantages in confront of Fit[] are : - the graphical output - error of the parameters - chi-square test and linear-correlation coefficient - error propagation

The function includes a complete and well tested management of input error and own messages.

All the details displayed by ?polyFit (after evaluating the function)

*Mathematics > Probability and Statistics

statistic, fit, least-squares, regression, interpolate, chi-square
Downloads Download Wolfram CDF Player

polyFit.m (20.6 KB) - Mathematica Package
sample.nb (6.1 KB) - Mathematica Notebook