Trigonometric Interpolation for even functions.

Hello, so I have this problem that I don't really even know how to start it, I would really apreciate if I would got some help, I don't really know how to put it into matlab context. Here is the text:
"Trigonometric interpolation for even functions. The function given by the table below is considered, a function assumed to be even and periodic for 2pi. Calculate the value of the polynomial T4f at the point a = 2 / pi relative to the nodes in the table."
Here is the table :

回答(1 个)

It is really a simple one. Read about interp1.
Say I have given (x,y=f(x)). I want to calculate value of y i.e f(x) at give x = xi; we use
yi = interp1(x,y,xi) ;
So you are provided with all the values.

3 个评论

Something like these?
x=[0,pi/6,pi/4,2*pi/3,5*pi/6];
y=[0,pi/6,pi/2,2*pi/3,pi/6];
xi=2/pi;
yi=interp1(x,y,xi);
You got x, what function you need? Sin or cos??
Well, i would have assumes that y is equal with f(x) from the table?

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by