Question: 2. Write a MATLAB function, called Newtons_divided differences that inputs a set of data points (, ) (datx, daty), a set a of numbers at

 2. Write a MATLAB function, called Newtons_divided differences that inputs a

2. Write a MATLAB function, called Newtons_divided differences that inputs a set of data points (, ) (datx, daty), a set a of numbers at which to interpolate, and outputs the polynomial in- terpolant, y, evaluated at a using Newton's divided differences. Your function header should look something like: function y Newtons-divided-differences (x, datx, daty) = (a) Use the code you developed to interpolate the functions fi (z) = e using the data points datx=-3 : 1 : 3. Interpolate at the points x=-3 : O01: 3. Call P5 the obtained interpolant. Plot the results and comment on the error. (b) Compare your result with the one while interpolating with Lagrange_poly. Comment

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!