Question: I only need PART B thanks MATLAB Problems: 1) For f(r)-e on [-2, 2], you are to compare evenly-spaced interpolation with Chebyshev interpolation. In this

I only need PART B
thanks  I only need PART B thanks MATLAB Problems: 1) For f(r)-e
on [-2, 2], you are to compare evenly-spaced interpolation with Chebyshev interpolation.

MATLAB Problems: 1) For f(r)-e on [-2, 2], you are to compare evenly-spaced interpolation with Chebyshev interpolation. In this excrcise, you do not have to usc any loops. a) Write a script file to do the following: For evenly-spaced nodes, call the code newtdd.m (on eLearning) to compute the coefficients for Newton's polynomial. Two of the nodes will coincide with the endpoints 2 and -2. Use these coefficients as input to the code nest.m (on eLearning) to compute the interpolating polynomial in vector form on a vector of x-values evenly spaced with a spacing 0.01 between -2 and 2 Plot the function f(x)-e, plot the interpolating polynomial, and also plot the vector of the absolute errors between the interpolating polynomial and the exact function on these 0.01-spaced x-values for 10 and- 30. Compute an estimate of the maximum of the absolute error in the interpolating polynomial for 30. Do you observe the Runge phenomenon? Note: the built-in functions max0, exp), abs0, and plot(x.y) will be helpful. Note that each time you exccute plot(x,y), any previous plot window will be overwritten. Using the figure command before each plot will open a new figure window for that plot. Page 2 of 4 b) Modify your script from part (a) to make a new script file to do the following: Compute the n Chebyshev nodes, and call newtdd.m and nest.m the same way you did in part (a) to get an interpolant on x-values evenly spaced by 0.01 between -2 and 2. Plot the new interpolating polynomial, and also plot the vector of the absolute errors between the interpolating polynomial and the exact function on these 0.01-spaced x-values for n10 and -30 Compute an estimate of the maximum of the absolute in the interpolating polynomial for 30

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!