function a=Taylor(a,z)
% TAYLOR re-expands the polynomial 
%   a=Taylor(a,z) re-expands the polynomial 
%   P(x)=a(1)*x^(n-1) + ... + a(n-1)*x + a(n) to 
%   a(1)*(x-z)^(n-1) + ... + a(n-1)*(x-z) + a(n)
%   the coefficients are overwritten. 

n=length(a);
for j=1:n-1
  for i=2:n-j+1
    a(i)=a(i-1)*z+a(i);
  end
end