Question: Use MATLAB to solve the following problem. (Polynomial interpolation, 10pts) Consider the following three samples of some function f(r) 2 (a) Determine the unique second

Use MATLAB to solve the following problem.

Use MATLAB to solve the following problem. (Polynomial interpolation, 10pts) Consider the

(Polynomial interpolation, 10pts) Consider the following three samples of some function f(r) 2 (a) Determine the unique second degree polynomial interpolant p2(z) to the above data using Lagrange's interpolation formula. You do not need to simplify the result. You may either work this out by hand or simply write an anonymous function in for the polynomial. (b) Repeat part (a) but use the Vandermonde matrix approach. In this case you will be solving for the coefficients ao, a, and a in the polynomial p2(x)a+a2r2 that interpolates the data. You can simply set up the linear system and solve the linear system in MATLAB . Be sure to print out the coefficients. (c) Show that (a) and (b) give the same result. You can do this by numerically comparing the polynomials at several (i.e. 100) points over the interval [-1, 1]

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!