clf
N=20;
M=50;
S=300;
X=zeros(2,N);
A=[.5 .4; -.104 1.1];
for k=1:M
x=[S*(rand-1/2);S*(rand-1/2)]
 for j = 1:N
    X(:,j)=A^(j-1)*x;     
 end   
plot(X(1,:),X(2,:),'g-*')
hold on
plot(X(1,1),X(2,1),'b*')  
plot(X(1,N),X(2,N),'r*')
%axis([-16 16 -16 16]);
end