Professional Documents
Culture Documents
2
2
h=1;
n=length(x)
b=zeros(n,n)
b(:,1)=y(:)
pause
for j=1:n
for i=1:n-j
b(i,j+1)=(b(i+1,j)-b(i,j))
pause
end
end
fprintf('-----------------------------')
xt=1
yint=b(1,1)
for j=1:n-1
xt=xt*(((xin-x(j)))/(h*factorial(j)))
pause
yint=yint+b(1,j+1)*xt
fprintf('-----------------------------')
pause()
end