Question: Plz use MATLAB codes and explain the code The aim of this lab is to write a function to compute the coefficients for a Hermite

Plz use MATLAB codes and explain the code
The aim of this lab is to write a function to compute the coefficients for a Hermite polynomial interpolating function using divided differences and then to use the coefficients to compute the Hermite interpolating polynomial. The algorithm for the divided difference formulas for the Hermite polynomial coefficients is: INPUT X = (X....,xn), Y =(f(x)....,f(x)), YP -(f'(x)...., f'(x)) OUTPUT Q.;, the appropriate divided differences, where the Hermite interpolating polynomial is Hymu (x)=2.0 + SQ:[](z-z;) and 2; = x, Zz4 = x; for i = 0,7 2n+1 STEP 1. For i=0,1,...n zzi = x 9210 = f(x) Q2i+1,0 = f(x) Q2i-12 - f'(x) If i then Q2- 9210-21-1,0 221 - 221-1 End If End STEP 2. For i = 2,3,..., 2n+1 For j = 2,3,..., Q-1-Q3-1.j-1 2-2- End End STEP 3. OUTPUT .. STOP (1). Write a matlab routine called main.m that calls a function that you write to compute the generalized divided differences given above. (2). Use a Hermite polynomial to interpolate the function f(x)=
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
