If you have a collection of data represented by n point on an xy-plane.
(X1, Y1) (X2, Y2) ... (Xn, Yn)
then the polynomial function will have a degree of n-1 with the resulting p(x):
p(x) = a0 + a1x + a2x2
+ . . . + an-1xn-1
To solve the n coeffiecients of p(x), substitute each of the n points into the polynomial function and obtain n linear equations in n variables.
No comments:
Post a Comment