Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 youimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions