function yi=interpol(x,y,xi)
% naive Polynominterpolation
n=length(x);
ni=length(xi);
mat=zeros(n,n);
mat(:,1)=ones(n,1);
for i=2:n
    mat(:,i)=mat(:,i-1).*x;
end
co=cond(mat)
coeff=mat\y;
mati=zeros(ni,n);
mati(:,1)=ones(ni,1);
for i=2:n
    mati(:,i)=mati(:,i-1).*xi;
end
yi=mati*coeff;
