ip_06_07.m
来自「Contemporary communication system一書之matl」· M 代码 · 共 27 行
M
27 行
% MATLAB script for Illustrative Problem 7, Chapter 6.echo onN=31;T=1;alpha=1/4;n=-(N-1)/2:(N-1)/2; % The indices for g_T% The expression for g_T is obtained nextfor i=1:length(n), g_T(i)=0; for m=-(N-1)/2:(N-1)/2, g_T(i)=g_T(i)+sqrt(xrc(4*m/(N*T),alpha,T))*exp(j*2*pi*m*n(i)/N); echo off ; end;end;echo on ;g_T=real(g_T) ; % The imaginary part is due to the finite machine precision% derive g_T(n-(N-1)/2)n2=0:N-1;% get the frequency response characteristics[G_T,W]=freqz(g_T,1);% normalized magnitude responsemagG_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 + =
减小字号Ctrl + -
显示快捷键?