% Lorenz_evalues.m
% Computes and plots e'values for linearized Lorentz
% eqs. used in stability analysis for various r values

n=10;

for j=1:n
r(j) = 1+ (j-1)*28/n;
sigma = 10;
b = 8/3;

% equilibrium P_2 = (xsta,ystar,zstar)
xstar = sqrt(b*(r(j)-1));
ystar = sqrt(b*(r(j)-1));
zstar = r(j)-1;

% A matrix
A = [-sigma    sigma    0;
      r(j)-zstar   -1     -xstar;
      ystar    xstar    -b]

% eigenvalues of A
 
eA(:,j)=eig(A)

end

plot(real(eA(1,:)),imag(eA(1,:)),'o',real(eA(2,:)),imag(eA(2,:)),'.',real(eA(3,:)),imag(eA(3,:)),'x')
