%
%  A test on Arnoldi (nonsymmetric).   B/L 7/23/2009
%

clear; 
close all; 

n=100; 
A=sprandn(n,n,0.1);
alleig=eig(full(A));

v0=ones(n,1); k=30;
[V,H, kact]=arnoldi(A, v0, k);

plot(alleig,'r+'); 
hold on
for i = 1:k, 
    i 
    if mod(i,2) == 0, 
       plot(eig(H(1:i,1:i)),'bo');
    else 
       plot(eig(H(1:i,1:i)),'go');
    end 
    pause
end 
hold off
