Question

Interpolation Polynomial Coding MATlab

I have to write a Matlab function called "interpoly(x,y) which calculates the corresponding interpolation polynomial for given support points (xj,fj) with x=[x1,x2,...,xn] and f=[f1,f2,...,fn] and in interval x[min xj, max xj] plotted. 


Any method can be used to calculate the interpolation polynomial but I think Lagrange would be the best. 


One rule is that I can not use "polyfit" command.


I have to test the programm with values of fj of the functions f(x)=cos(x) and f(x)=1/(1+x^2) each in the interval [-6,6]. I have to use both equidistant support points and Tschebscheff support points. 


It is okay to use linspace(a,b,n) to generate n equidistant support points in the interval [a,b]. 


I add the question as a picture. 

WhatsApp Image 2021-11-24 at 18.48.38.jpeg

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Interpolation Polynomial Coding MATlab
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT