%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MAO 2004/2005
%
%   =================================================
%   Premiers exemples en Matlab
%   =================================================
%
%   Racines d'un polynôme
%   L'exemple de Wilkinson
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i=1;
for n=5:5:30
   r=1:n;
   z(1:n,i)=roots(poly(r));
   i=i+1;
end
figure(1)
n=5;
for k=1:6
   subplot(3,2,k),plot(real(z(1:n,k)),imag(z(1:n,k)),'+')
   titre=sprintf('n= %d',5*k);
   legend(titre,-1)
   n=n+5;
   clear titre;
end

