function rtheta(n) %n = 6; m=2; T = chaingraph(n); global RR HH %RR = []; HH=[]; while 1 for i=1:m for j=1:m psi(i,j) = randinseg(1,5); end end P = treefillprob(m,n,T,psi); [b,A,C,dd] = is_markov(P,m,n); th = strict(A); %[hh,Ht,H] = gethhn(P,m,n); th = H; R = max(psi(:))/min(psi(:)); RR(end+1) = R; HH(end+1) = th; hold off plot(RR,HH,'ob'); %alf = max( log(1-HH)./(1-RR) ); hold on %plot(RR,(1-exp(alf*(1-RR))),'.r'); plot(RR,(RR-1)./(RR+1),'.r') drawnow %fprintf('n = %d alf = %1.9f \n',n,alf); end return