nbpoints=10000
P=zeros(2,nbpoints)
for i = 2:nbpoints
    tirage=rand()
    if tirage <0.01 then A=[[0,0] ;[0,0.16]];V=[0;0];
    else if tirage <0.86 then  A=[[0.85,0.04] ;[-0.04,0.85]];V=[0;1.6];
     else if tirage <0.93 then A=[[0.2,-0.26] ;[0.23,0.22]];V=[0;1.6];
         else  A=[[-0.15,0.28] ;[0.26,0.24]];V=[0;0.44];
         end
     end
 end 
 P(:,i)=A*P(:,i-1)+V;
end
plot(P(1,:),P(2,:),"*g");
    
    