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

📄 comp_exam8_1.m

📁 the source code of Ziemer s book Digital communication. This code is related to the exercise part.
💻 M
字号:
% Bit error probabilities -  M-ary PSK
%
clf
z_dB = 5:.1:40;
z = 10.^(z_dB/10);
for j = 1:8
   M=2^j;
   A=2/log2(M);
   k=(sin(pi/M))^2*log2(M);
   if j == 1 | j == 2
      Pb = qfn(sqrt(2*z));
   elseif j >= 3
      Pb = A*qfn(sqrt(k*2*z));
   end
   semilogy(z_dB,Pb),axis([5 40 10^(-6) 1]),xlabel('E_b/N_0, dB'),ylabel('P_E_, _b_i_t'),...
   if j == 1 | j == 2
      text(z_dB(50)+.2, Pb(50), 'M = 2 & 4')
   elseif j == 3 | j == 4
      text(z_dB(50)+.2, Pb(50), ['M = ', num2str(M)])
   elseif j > 4
      text(z_dB(180)+.2, Pb(180), ['M = ', num2str(M)])
   end
   if j==1
      hold on
      grid
   end
end
title('Bit error probability for MPSK')

⌨️ 快捷键说明

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