% exponential behavior for 
% a number of matrices are given.
%
% WARNING spec_abs and num_abs must be obtained from 
% eigtool before
% executing this file.


N=10;
lambda=-0.1;
%alpha=0.0001;
alpha=0.00001;
A=gallery('forsythe',N,alpha,lambda);
t=0:0.2:50;
l=size(t);l=l(2);
f=zeros(1,l);
for k=1:l
    f(k)=norm(expm(t(k)*A));
end 
figure
semilogy(t,f)
hold on
plot(t,exp(spec_abs*t),'-r')
plot(t,exp(num_abs*t),'-g')
hold off
% figure
% plot(t,f)
% hold on
% plot(t,exp(spec_abs*t),'-r')
% plot(t,exp(num_abs*t),'-g')
% hold off