clear all;

% L=250; U=250;
L=2.5; U=2.5;
figure(2);
axis([-L U -L U]);
axis manual;
A=[-L U; 0 0];
B=[0 0; -L U];
plot(A(1,:),A(2,:));
hold on;
plot(B(1,:),B(2,:));
grid;

% A=[1 -1.5; 1.5 1]     % r = sqrt(13)/2 = 1.8018 > 1  

A=[0.5 -0.75; 0.75 0.5]   % r = sqrt(13)/4 = 0.9014 < 1  

x=ones(2,1)+rand(2,1);

for k=1:30

  plot(x(1),x(2),'or');
  hold on;pause(0.3)

  x=A*x;

end