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

📄 c5_firdesign.m

📁 無線通訊系統仿真原理與應用 詳細介紹通訊的仿真方法
💻 M
字号:
% File: c5_FIRdesign.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.
%
L = 30;										% 2L+1 total points
lam = 0.3;									% normalized cutoff frequency
m = -L:1:L;									% vector of points
bp = sin(pi*lam*(m+eps))./(pi*(m+eps));	    % impulse response
stem(0:2*L,bp,'.')							% plot impulse response
xlabel('Sample index')
ylabel('Impulse response')
figure; a = 1; freqz(bp,a)					% plot amp and phase response
figure; subplot(2,1,1)						% new figure									
[H w] = freqz(bp,a);							
plot(w/pi,abs(H)); grid;					% unwindowed amp response
xlabel('Frequency (normalized to the Nyquist frequency = fs/2)')
ylabel('|H(f)| (unwindowed)')
subplot(2,1,2)
w = 0.54+0.46*cos(pi*m/L);					% Hamming window
wbp = bp.*w;								% apply window
[H w] = freqz(wbp,a);
plot(w/pi,abs(H)); grid;					% windowed amp response
xlabel('Frequency (normalized to the Nyquist frequency = fs/2)')
ylabel('|H(f)| (windowed)')
% End of script file. 

⌨️ 快捷键说明

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