%
% Example 5 from Sec 5.6
%
A = [1.25 -.75; -.75 1.25]

% Invoke plot screen
axis([-100,100,-100,100])
grid
hold on

% Choose an initial vector
x = [input('x-axis = '); input('y-axis = ')];

% Choose the running time
n = input('n = ');

% Graph the numerical solution.
for i = 1:n
   xa = A * x;
   arrow(x,xa-x,'r',2);
   x = xa;
end

% Now look at eigenvalues of A
disp('The eigenvalues are:');
disp(eig(A)');
[P,D] = eig(A);
disp('The eigenvectors are:');
disp(P);
