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

📄 ip_06_08.m

📁 数字通信第四版原书的例程
💻 M
字号:
% MATLAB script for Illustrative Problem 8, Chapter 6.
echo on
N=31;
T=1;
W=1/(2*T);
n=-(N-1)/2:(N-1)/2;			% The indeces for g_T
% The expression for g_T is obtained next
for i=1:length(n),
  g_T(i)=0;
  for m=-(N-1)/2:(N-1)/2,
    if ( abs((4*m)/(N*T)) <= W ),
      g_T(i)=g_T(i)+sqrt((1/W)*cos((2*pi*m)/(N*T*W)))*exp(j*2*pi*m*n(i)/N);
    end;
  end;
end;
% obtain g_T(n-(N-1)/2)
n2=0:N-1;
% obtain the frequency response characteristics
[G_T,W]=freqz(g_T,1);
% normalized magnitide response  
magG_T_in_dB=20*log10(abs(G_T)/max(abs(G_T)));
% Impulse response of the cascade of the transmitter and the receiver filters..
g_R=g_T;
imp_resp_of_cascade=conv(g_R,g_T);
% plotting commands follow

⌨️ 快捷键说明

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