Question: Please help also add comment on code Write a MATLAB function, called Newtons_divided differences that inputs a set of data points (z, ) (datx, daty),
Please help also add comment on code

Write a MATLAB function, called Newtons_divided differences that inputs a set of data points (z, ) (datx, daty), a set z of numbers at which to interpolate, and outputs the polynomial in- terpolant, y, evaluated at 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(zing 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
Get step-by-step solutions from verified subject matter experts
