You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
clc;
x=input("enter x");
y=input("enter y");
n=length(x);
f=zeros(n,n);
f(:,1)=y;
p=input("enter point");
for i=2:n
for j=i:n
f(j,i)=(f(j,i-1)-f(j-1,i-1))/(x(j)-x(j-i+1));
end
end
for i=1:n
prod(i)=1;
for j=1:i-1
prod(i)=prod(i)*(p-x(j));
end
end
sum=0;
for i=1:n
sum=sum+(f(i,i)*prod(i));
end
disp(sum);
Cite As
Akshay (2026). na-lab-newtondivided differences (https://www.mathworks.com/matlabcentral/fileexchange/120523-na-lab-newtondivided-differences), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0 (1.17 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |
