Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: odd power polynomial Interpolation ////
Replies: 2   Last Post: May 10, 2013 1:55 PM

 Messages: [ Previous | Next ]
 Torsten Hennig Posts: 2,419 Registered: 12/6/04
Re: odd power polynomial Interpolation ////
Posted: May 10, 2013 7:13 AM

> Hi.
>
> I have a vector X and it's corresponding vector Y.
> Now i want to interpolate using a polynomial like
> this:
> Y=aX+bX^3+cX^5+...
>
> How can i do that?
>
> All answers are appreciated ...

If (x_i,y_i) (i=1,...,n) are your measurements,
solve the linear system in the unknowns a,b,c,...
y_i = a*x_i + b*x_i^3 + c*x_i^5 + ... (i=1,...,n)
by using the \ - operator.

Thus build the matrix A with row i defined as
[x_i (x_i)^3 (x_i)^5 ...]
and the column vector b with i-th entry y_i and
solve for the coefficient vector coeff as
coeff=A\b.
Then coeff(1)=a, coeff(2)=b, coeff(3)=c, ...

Best wishes
Torsten.

Date Subject Author
5/10/13 Omid Reza
5/10/13 Torsten Hennig
5/10/13 Omid Reza