CMacDady
CMacDady

Reputation: 227

How to curve fit data in Excel to a multi variable polynomial?

I have a simple set of data, 10 values that increase.

I want to fit them to a polynomial of the form: Z = A1 + A2*X + A3*Y + A4*X^2 + A5*X*Y+ A6*Y^2

Where Z the output is the set of data above, A1 - A6 are the coefficients I am looking for, X is the range of inputs (10 of course), and Y for the moment is a constant value.

How can I curve fit to this polynomial and not the standard 2nd order one that is created using 'trendline'?

Upvotes: 2

Views: 5944

Answers (1)

RonnieDickson
RonnieDickson

Reputation: 1420

Construct a Vandermonde matrix on your data points, find it's inverse with MINVERSE, then apply this to the vector of Z values with MMULT. This would work for polynomial degree n with n data points.

Otherwise you could try polynomial regression, which will again use the Vandermonde matrix.

More math than Excel really.

Upvotes: 4

Related Questions