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

📄 ip_09_06.m

📁 现代通信系统(matlab版) 书中的matlab源代码
💻 M
字号:
% MATLAB script for Illustrative Problem 9.6.
clear
echo on
rho_b1=0:5:35;	           		% rho in dB for the simulated error rate 
rho_b2=0:0.1:35; 	   		% rho in dB for theoretical error rate computation
for i=1:length(rho_b1),
  smld_err_prb(i)=ss_pe96(rho_b1(i));	% simulated error rate
  echo off ;
end;
echo on ;
for i=1:length(rho_b2),
  temp=10^(rho_b2(i)/10);	
  if (temp>2)
    theo_err_rate(i)=1/(exp(1)*temp);	% theoretical error rate if rho>2
  else
    theo_err_rate(i)=(1/2)*exp(-temp/2);% theoretical error rate if rho<2
  end;
  echo off ;
end;
echo on ;
% Plotting commands follow.

⌨️ 快捷键说明

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