⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comp_exam6_3.m

📁 the source code of Ziemer s book Digital communication. This code is related to the exercise part.
💻 M
字号:
clear all							% be safe
n = [4 8 12];						% wordlengths
snrtdB = 0:0.1:30;				% predetection snr in dB
snrt = 10.^(snrtdB/10);			% predetection snr
Pb =0.5*exp(-snrt/2);			% bit error probability
hold on								% hold for multiple plots
for k=1:length(n)
   Pw = 1-(1-Pb).^n(k);			% current value of Pw
   a = 2^(-2*n(k));				% temporary constant
   snrd = 1./(a+Pw*(1-a));		% postdetection snr
   snrddB = 10*log10(snrd);	% postdetection snr in dB
   plot(snrtdB,snrddB)
end
hold off								% release
xlabel('Predetection SNR in dB')
ylabel('Postdetection SNR in dB')

   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -