I have 100 SNR (signal to noise ratio),
SNR=[32.48873121,21.11297791,15.04042054,15.03765931,14.9860986,14.70063992,14.0914781,12.63557416,11.90471529,10.66141951,10.61423996,8.872149307,7.489301489,7.409686903,5.356321373,4.42000844,4.137654873,3.884999624,3.784549782,3.348447225,3.285491969,3.197460245,2.848888812,2.160133333,1.915260409,1.563950453,1.329209884,1.191461459,0.790756594,0.611525663,0.575573311,0.140882111,-0.036497656,-0.111073002,-0.258210049,-0.848790033,-1.25026649,-1.446774222,-2.080726269,-2.359212956,-2.516335413,-2.595010771,-3.063688167,-3.257431493,-3.283558882,-3.351236489,
-3.466831795,-3.665976748,-3.821897741,-4.51332461,-4.564700129,-4.718940301,-4.79394587,-4.85247625,-5.000716016,-5.129179148,-5.393944029,-5.499661228,-5.550047619,-5.671860615]
For this particular SNR i have found BLER (block error rate) by using the following code:
SNR_L = [-8 -6 -4 -2];
L = [0.1231 0.0366 0.0082 0.0014];
logL=log10(L);
p=polyfit(SNR_L,logL,1);
semilogy(SNR_L,L,'k-s');
grid on;
for i=1:100
BLER(i)=p(1,2)+p(1,1)*SNR(i);
end
Here i am using the graph that i find from this code-semilogy(SNR_L,L,'k-s')
.As i am using polyfit and degree=1 then i find 2 coefficient,like y=a0+a1x
.So to find BLER I am using this code BLER(i)=p(1,2)+p(1,1)*SNR(i)
. As I am finding 100 SNR that's why finally I use for loop to find 100 BLER for corresponding SNR.
But I cannot get right BLER for positive SNR. From my point of view if SNR is high then i will get very low BLER but i get high BLER.