Hello to everyone. I want to create a Pd - SNR dB graph. I extracted the Probability detection formula. Here I took the power of the noise as a variable to generate Snr_dB. When L=100, the graph looks good, but as I enlarge the L value, my graph gets distorted. I couldn't understand why. When L values are 10,100,1000, I expect a graph similar to the one I will put below, but it breaks down except for the value of 100. I will be glad if you can help me by sharing the code. If there is something in the code that you don't understand, I can explain.
L=100;
thr=0.01;
snr_dB = [-25:2:20]; % SNR in decibels
snr = 10.^(snr_dB./10);
for k=1:length(snr)
n_sigma(k)=(0.0206+0.0074)/snr(k);
Pd_denklem(k) = (thr-L*(0.0206+n_sigma(k)+0.0074))/sqrt((L*(4*0.0074*(0.0206+n_sigma(k))+2*(0.0206+n_sigma(k))^2)));
pd(k)=qfunc(Pd_denklem(k));
end
plot(snr_dB,pd)

댓글 수: 4

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 8월 1일
Pl., post the formulations taken for n_sigma, Pd_denklem in your code.
studentmatlaber
studentmatlaber 2021년 8월 1일
편집: studentmatlaber 2021년 8월 1일
I think I can write it this way most clearly. If there is anything unclear, you can ask. This graph is very important to me, I would be very grateful if you could help me.
studentmatlaber
studentmatlaber 2021년 8월 2일
@Sulaymon Eshkabilov can you help me?
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 8월 2일
I will try to rewrite the code according to your posted formulations.

댓글을 달려면 로그인하십시오.

 채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 8월 2일

0 개 추천

I have looked through your code that is written according to your provided formulations. That means that your provided formulations are not accurate. As we know that SNR = (Power of signal)/(Power of noise) and SNR (dB) = 10*log10( (Power of signal)/(Power of noise)). Thus, my advise is to verify your formulations carefully for once more. Particularly, a first formulation SNR = (S_x^2+M_x^2)/S_w^2 = (0.0206+0.0074)/n_sigma has to be checked. Moreover, what is N in your shown reference plot. In addition, the values of lambda and L should be taken carefully.

댓글 수: 2

studentmatlaber
studentmatlaber 2021년 8월 12일
thank you for your help
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 8월 12일
Most welcome.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by