c5_sqrcdemo.m

来自「無線通訊系統仿真原理與應用 詳細介紹通訊的仿真方法」· M 代码 · 共 27 行

M
27
字号
% File: c5_sqrcdemo.m
% Software given here is to accompany the textbook: W.H. Tranter, 
% K.S. Shanmugan, T.S. Rappaport, and K.S. Kosbar, Principles of 
% Communication Systems Simulation with Wireless Applications, 
% Prentice Hall PTR, 2004.
%
T = 1;								% symbol time
k = 10;								% samples per symbol
m = 4;								% delay
beta = 0.32;						% bandwidth factor
h = sqrc(T,k,m,beta);				% impulse response
in = zeros(1,101); in(11) = 1;	    % input
out = conv(in,h);					% output h[10]
out1 = conv(out,h);					% conv of h[n-10] and h[n]
t = 2:0.1:8;						% time vector for plot
subplot(2,1,1)
stem(t,out(21:81),'.')				% plot h[n-10]
grid
xlabel('Time')
ylabel('h[n-1]')
subplot(2,1,2)
t = 6:0.1:12;						% time vector for plot
stem(t,out1(61:121),'.')			% plot conv of h[n-10] and h[n]
grid
xlabel('Time')
ylabel('conv(h[n-1],h[n])')
% End of script file.

⌨️ 快捷键说明

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