function Q=nevilleQ(X,Y,x)
N1=length(X);
for i=1:N1
    Q(i,1)=Y(i);
end
for i=2:N1
    for j=2:i
        Q(i,j)=((x-X(i-j+1))*Q(i,j-1)-(x-X(i))*Q(i-1,j-1))/(X(i)-X(i-j+1));
    end
end
% Q=nevilleQ([1.0 1.3 1.6 1.9 2.2],[0.7651977 0.6200860 0.4554022 0.2818186 0.1103623],1.5)
% save 'q.txt' Q -ascii     

