@Matlab
Neville’s Iterated Interpolation
In mathematics, Neville’s algorithm is a method of computing interpolating polynomials, developed by mathematician Eric Harold Neville.
Algorithm step
To evaluate the interpolating polynomial P on the n + 1 distinct numbers x0,…,xn at the number x for the function f:
Input
numbers x,x0,x1,…xn;
values f(x0),f(x1),…,f(xn) as the first column Q0,0,Q1,0,…,Qn,0 of Q.
Output
the table Q with P(x)=Qn,n.
Step prompt
Step 1
for i = 1,2,…,i
for j = 1,2,…,j
set Qi,j=((x-xi-j)Qi,j-1-(x-xi)Qi-1,j-1)/(xi-xi-j).
Step 2
Output(Q)
Stop
The code is as follows
function feval = NevilleInterpolation(xs, fs, xeval)
n