%------------------------------------------------------------

% Tony Hyun Kim

% 18.701 PS#6, Artin 4.54

%------------------------------------------------------------



x = [1 1]'; % starting vector (randomly chosen)

A = [3 1; 3 4];



N = 10;

y = zeros(N,2);

for i = 1:N

     y(i,:) = (A^i*x)';

end



r = zeros(N-1,1);

for i = 1:(N-1)

     r(i) = norm(y(i+1,:))/norm(y(i,:));

end



% r =

% 

%     5.4927

%     5.3676

%     5.3239

%     5.3096

%     5.3049

%     5.3035

%     5.3030

%     5.3028

%     5.3028