%Functia de autocorelatie in tandem
pbr=0.01;%modelul tandem bernoulli
ptbr=2*pbr*(1-pbr);
tau=1:3000;
rtbr=ptbr;

p=0.187966*10^(-2);%modelul tandem gilbert-elliot
q=0.080617;
pg=0.563331*10^(-3);
pb=0.417201;
rge=(q*pg+p*pb)/(p+q)+(p*q*(pb-pg)^2)*((1-p-q).^tau)/((p+q)*(q*pg+p*pb));
semilogx(tau,rtbr,'.r',tau,rge)
