1. The document describes using the Newton forward difference interpolation method in MATLAB to estimate an unknown value (yj) of a function given a set of x-y data points.
2. It generates difference tables by taking successive differences of the y-values and uses these to calculate coefficients for the Newton polynomial interpolation formula.
3. It then applies this formula to estimate yj, the value of the function at xj=218, given the x-y data points and difference tables.
1. The document describes using the Newton forward difference interpolation method in MATLAB to estimate an unknown value (yj) of a function given a set of x-y data points.
2. It generates difference tables by taking successive differences of the y-values and uses these to calculate coefficients for the Newton polynomial interpolation formula.
3. It then applies this formula to estimate yj, the value of the function at xj=218, given the x-y data points and difference tables.
1. The document describes using the Newton forward difference interpolation method in MATLAB to estimate an unknown value (yj) of a function given a set of x-y data points.
2. It generates difference tables by taking successive differences of the y-values and uses these to calculate coefficients for the Newton polynomial interpolation formula.
3. It then applies this formula to estimate yj, the value of the function at xj=218, given the x-y data points and difference tables.
1. The document describes using the Newton forward difference interpolation method in MATLAB to estimate an unknown value (yj) of a function given a set of x-y data points.
2. It generates difference tables by taking successive differences of the y-values and uses these to calculate coefficients for the Newton polynomial interpolation formula.
3. It then applies this formula to estimate yj, the value of the function at xj=218, given the x-y data points and difference tables.
ROLL NO:FA20-BME-005 SECTION:A Newton Forward Difference Interpolation Method: x=[100:50:400]; y=[11.63 13.03 15.04 17.81 19.42 20.9 22.27] a=length(x); b=length(y); for n=1:6 del(1,n)=y(n+1)-y(n); end dell=[ del';0] for m=1:5 squaredel(1,m)=del(m+1)-del(m); end squaredell=[squaredel';0;0]; for t=1:4 cubedel(1,t)=squaredel(t+1)-squaredel(t); end cubedell=[cubedel';0;0;0]; for u=1:3 fourdel(1,u)=cubedel(u+1)-cubedel(u); end fourdell=[fourdel';0;0;0;0] for v=1:2 fivedel(1,v)=fourdel(v+1)-fourdel(v); end fivedell=[fivedel';0;0;0;0;0] for w=1:1 sixdel(1,w)=fivedel(w+1)-fivedel(w); end sixdell=[sixdel';0;0;0;0;0;0]
xj=218; h=x(1,2)-x(1,1); xo=x(1,1); p=(xj-xo)/h; a=(p*dell(1,1)); b=(p*(p-1)*squaredell(1,1))/factorial(2); c=(p*(p-1)*(p-2)*cubedell(1,1))/factorial(3); d=(p*(p-1)*(p-2)*(p-3)*fourdell(1,1))/factorial(4); e=(p*(p-1)*(p-2)*(p-3)*(p-4)*fivedell(1,1))/factorial(5); f=(p*(p-1)*(p-2)*(p-3)*(p-4)*(p-5)*sixdell(1,1))/factorial(6); yj=y(1,1)+a+b+c+d+e+f; disp('the difference table is as under') dt h xo p xj fprintf('the required value of the function is %f\n',yj)