%Functia de autocorelatie a erorilor pentru modelele de canal tip Bernoulli, Gilbert, Fritchman
pbr=0.01;%modelul bernoulli
tau=1:3000;
rbr=pbr;

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

p11=0.998511; %modelul fritchman cu trei stari
p31=0.142542;
p13=0.001489;
p32=0.396651;
p23=0.135132;
p22=0.864868;
afr=1:10000;
