matlab程序
麻烦大神们看看这个程序哪错了?function yi=New_Int(x,y,xi)
n=length(x);
m=length(y);
if n~=m
error('The lengths of X and Y must be equal');
return;
end
Y=zeros(n);
Y(:,1)=y';
for k=1:n-1]
if abs(x(i+k)-x(i))<eps
error('the DATA is error');
return;
end
Y(i,k+1)=(Y(i+1,k)-Y(i,k))/(x(i+k)-x(i));
end
end
yi=0;
for i=1:n
z=1;
for k=1:i-1
z=z*(xi-x(k));
end
yi=yi+Y(1,i)*z;
end