function z=Nickel(a)
% NICKEL computes the zeros of the polynomial
%   z=Nickel(a)computes the zeros of the polynomial with coefficients
%   in the vector a using Nickel's method. Uses Taylor.m

n=length(a); degree=n-1;
z=[]; x=0; h=1+sqrt(-1);
for m=degree:-1:1
  while abs(a(m+1))>norm(a)*eps                  % Nickel iteration 
    x=x+h; a=Taylor(a,h);
    if m==1, 
      h=-a(2)/a(1);
    else
      [hh,j]=min(abs((-a(m+1)./a(m+1-[2:m])).^(1./[2:m])));
      h=(-a(m+1)/a(m+1-j))^(1/j);
    end 
  end
  a=a(1:m);                                       % deflation 
  z=[z;x];
end