% Experiments with the "power method" for finding the eigenvalues of a
% matrix
%
% Samuli Siltanen November 2012

% Create a matrix
A = [[1 1];[2 0]]

% Choose a vector
x = [1;3]

% Create a plot window
figure(1)
clf

% Iterate
for iii = 1:10
    x = A*x;
    
    x = x/norm(x);
    
    plot([0 x(1)],[0 x(2)],'r','linewidth',2)
    hold on
    axis equal
    pause
end


