Linear Least-Squares Data-Fitting Utility
This page contains a linear least-squares data-fitting utility. The function to be fit to the data is a polynomial expression of degree four or less.
Author: Stephen Nash, George Mason University
From the book "Numerical Methods and Software" by
D. Kahaner, C. Moler, and S. Nash
Prentice Hall, 1988
Dongarra, J. J.; J.R. Bunch; C.B. Moler; and G.W. Stewart.
"LINPACK User's Guide"
For background on linear, least-squares data fitting, please visit the Background and Worked Example page (opens in a new window).
HOW TO USE THIS UTILITY
Enter the data pairs below, and specify the degree of the polynomial to be fit to the data.
Then click the "Solve" button.
The results are output below.
Always check the value of the rank of the coefficient matrix after running this utility. The rank should be 1 + the degree of polynomial selected. For example, if a polynomial of degree 2 was selected, the rank should be 3; if a polynomial of degree 3 was selected, the rank should be 4; etc. If the rank is less than this value, the solution is most likely meaningless.
This utility accepts up to twenty data pairs, (x i , y i ). Enter the data pairs below. Ensure that the checkbox to the left of each data pair is checked; otherwise, this utility will not include the values for that data pair in its calculations.