Question: Solve Using MATLAB Please!! Thank you Problem. 3 Interpolation. 25pts Consider the following 8 points, whose coordinates are: X- [1 2345678]: [0 1 0 1

Solve Using MATLAB Please!! Thank youSolve Using MATLAB Please!! Thank you Problem. 3 Interpolation. 25pts Consider the

Problem. 3 Interpolation. 25pts Consider the following 8 points, whose coordinates are: X- [1 2345678]: [0 1 0 1 0 1 0 1]; a) 10pts] Write a Matlab code to compute the Lagrange through these 8 evenly-spaced points. NAME YOUR CODE TheBarn.m b) [2pts] Plot the values of the Lagrange Polynomial for at the finely spaced values xx[ 0.5: 0.01:8.5] along with the 8 original points (as red circles, to verify that the Lagrange Polynomial does go through them). [8pts] Use the built-in Matlab function spline.m to compute the values YY given by spline interpolation of the original 8 points (define by the coordinate X and Y) at the same values xx as in part B. c) To do so use the command "yy spline(X, Yxx)" (type in your Matlab prompt "help spline.m" for further infos). Plot the values (xx,yy)of the spline interpolation. Verify that the Spline interpolation does go through the same original 8 points. . NAME YOUR CODE MySpline.m d) Spts. Comment on the difference between the spline interpolation and the Lagrange polynomial across the interval xx-[ 0.5: 0.01 : 8.5]

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!