  function c = InterpNRecur(x,y)
%
% Pre:
%   x:  column n-vector with distinct components.
%   y:  column n-vector.
%
% Post:
%   c:  a column n-vector with the property that if
%       p(x) = c(1) + c(2)(x-x(1))+...+ c(n)(x-x(1))...(x-x(n-1))
%       p(x(i)) = y(i), i=1:n.
%
%
   n = length(x);
   c = zeros(n,1);
   c(1) = y(1);
   if n > 1
      c(2:n) = InterpNRecur(x(2:n),(y(2:n)-y(1))./(x(2:n)-x(1)));
   end
  
   
 
