General form of Newtons interpolation polynomials is as foll
     General form of Newton\'s interpolation polynomials is as follows f_n(x) = f(x_0) + (x - x_0) f[x_1, x_0\\ + (x - x_1] f[x_2, x_1, x_0] + ... + (x - x_0)(x - x_1)...(x - x_n-1) f[x_n, x_n-1, ...x_0] where f[x_i, x_j] - f[x_j, x_k]/x_i - x_j  f[x_n, x_n-1 ..., x_1, x_0] = f[x_n, x_n-1, ...x_1] - f[x_n-1, x_n-2, ..., x_0]  x_0 x_1 x_2 x_3  f(x_0) f(x_1) f(x_2) f(x_3) f[x_1, x_0] f[x_2, x_1] f[x_3, x_2]  f[x_2, x_1, x_0] f[x_3, x_2, x_1] f[x_3, x_2, x_1, x_0] for n = 3  For the data in the table, develop a Matlab code to estimate f(0.7) with 1^st order, 2^nd order, 3 order, and 4^th order Newton\'s interpolation According to the pseudocode provided below!. Also estimate errors for each case.  SUBROUTINF Newt Int (x, y, n, xi, yint, ea)  LOCAL fdd_n.n  DOFOR i = 0, n  fdd_i.0 = Y_i  END DO  DOFOR j = 1, n  DOFOR i - 0, n - j  fdd_i, j = (fdd_i, j-1 - fdd_i, j-1)/(x_i+j - x_i)  END DO  END DO  xterm = 1  yint_0 = fdd_0.0  DOFOR order = 1, n  xterm = xterm * (x_i - x_order-1)  yint2 = yint_order-1 + fdd_0.order * xterm  ea_order-1 = yint2 - yint_order-1  yint_order = yint2  END order  END Newt Int  An algorithm for Newton\'s interpolating polynomial written in pseudocode.  ![General form of Newton\'s interpolation polynomials is as follows f_n(x) = f(x_0) + (x - x_0) f[x_1, x_0\\ + (x - x_1] f[x_2, x_1, x_0] + ... + (x - x_0)(x - x  General form of Newton\'s interpolation polynomials is as follows f_n(x) = f(x_0) + (x - x_0) f[x_1, x_0\\ + (x - x_1] f[x_2, x_1, x_0] + ... + (x - x_0)(x - x](/WebImages/9/general-form-of-newtons-interpolation-polynomials-is-as-foll-1000054-1761515050-0.webp) 
  
  Solution
function fp=forward_interpolation(x,y,p)
 n=length(x);
 for i=1:n
 diff(i,1)=y(i);
 end
 for j=2:n
 for i=1:n-j+1
 diff(i,j)=diff(i+1,j-1)-diff(i,j-1);
 end
 end
 answer=y(1);
 h=x(2)-x(1);
 s=(p-x(1))/h;
 for i=1:n-1
 term=1;
 for j=1:i
 term=term*(s+j-1)/j;
 end
 answer=answer+term*diff(1,i+1);
 end
 fp=answer;
Arguments sent to the function are:- lagrange(xdataset,ydataset,interpolating point)
![General form of Newton\'s interpolation polynomials is as follows f_n(x) = f(x_0) + (x - x_0) f[x_1, x_0\\ + (x - x_1] f[x_2, x_1, x_0] + ... + (x - x_0)(x - x  General form of Newton\'s interpolation polynomials is as follows f_n(x) = f(x_0) + (x - x_0) f[x_1, x_0\\ + (x - x_1] f[x_2, x_1, x_0] + ... + (x - x_0)(x - x](/WebImages/9/general-form-of-newtons-interpolation-polynomials-is-as-foll-1000054-1761515050-0.webp)
