Perform a Least Squares Curve Fit
Perform a Least Squares Curve Fit
(OP)
Hi, everyone,
I am trying to find a program to perform a least squares curve fit with a ten coefficient equation.
z=c1+c2*(x)+c3*(y)+c4*(x^2)+c5*(x*y)+c6(y^2)+c7*(x^3)+c8(x^2*y)+c9(x*y^2)+c10*(y^3)
Does anyone know where I could find the program?
Thanks in advance.
I am trying to find a program to perform a least squares curve fit with a ten coefficient equation.
z=c1+c2*(x)+c3*(y)+c4*(x^2)+c5*(x*y)+c6(y^2)+c7*(x^3)+c8(x^2*y)+c9(x*y^2)+c10*(y^3)
Does anyone know where I could find the program?
Thanks in advance.






RE: Perform a Least Squares Curve Fit
Now use the Solver which comes as a standard part of Excel. (You may need to activate its add-in first.) You want to minimise the sum of the squared errors by varying your ten coefficients. Your answer is then one click away, since your problem is (presumably) an unconstrained one.
Two caveats. Firstly I have never used the Solver with as many as ten variables, so I cannot vouch for it here. Secondly, you need your starting guess to be reasonably close to the final answer.
HTH
RE: Perform a Least Squares Curve Fit
Cheers
Greg Locock
RE: Perform a Least Squares Curve Fit
Now make make linear fit and select the non-zero range of all columns but the first one as independent variables and let Excel calculate the coefficients.
Try first with a simple case with z=Ax+By+Cxy to see the idea.
m777182
RE: Perform a Least Squares Curve Fit
I have tried dedicated programs, and never found anything that matches a spreadsheet - I use Excel and Quattro Pro. A useful advantage of doing it in a spreadsheet is that you can link a graph to the results and immediately see how good your curve is.
RE: Perform a Least Squares Curve Fit
RE: Perform a Least Squares Curve Fit