Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here is what I need to do. 1, allow user to input the interval of interpolation

ID: 3565221 • Letter: H

Question

Here is what I need to do.

1, allow user to input the interval of interpolation ([a, b]), number of interpolation points (n), and a total of 4 functions(f, h,g, and i)

2. create a divided difference table and find the coeeficients

3. plot the error between original function and interpolant.

I have everything up where i need to plot the error because i cant figure out how to make aloop to build the polynomial with the coeeficients that I have found so I can evaluate at some dense mesh interval to plot agianst my original functions.

Say I have a n coeeficients in an vector called C decending order of powers. Sio my polynomial will look like this

C(1)*t^n + C(2)*t^n-1 + .... + C(n)*t^0

Can someone help me make a loop for this for any size n?

Explanation / Answer

THE matlab loop code is