A=[.8 .2 .1;.1 .7 .3; .1 .1 .6]
axis([0 1 0 1]);axis('square')
     plot(0,0);hols on
title('Markov');xlabel('a');ylabel('b');grid
nappula=1
while nappula==1
   [a,b,nappula] = ginput(1)
    u=[a;b;1-a-b];
    x=u; k=0:7;
    while length(x)<=7
      u=A*u; x=[x u];
    endwhile
      plot(x(1,:),x(2,:),x(1,:),x(2,:),'o')
endwhile
hold off