?? 8.txt
字號:
wc=0.5*pi;
N=21;
Window=hamming(N);
hn=fir1(N-1,wc/pi,Window);
[H,W]=freqz(hn,1,512);
subplot(6,1,1);
plot(hn,'.');
grid
xlabel('n');
ylabel('hn');
subplot(6,1,2);
plot(W/pi,abs(H));
grid
xlabel('頻率');
ylabel('幅度');
subplot(6,1,3);
plot(W/pi,20*log10(abs(H)));
grid
xlabel('頻率');
ylabel('幅度(dB)');
subplot(6,1,4);
plot(Window,'.');
grid
xlabel('n');
ylabel('hn');
[W1,W2]=freqz(Window,1,512);
subplot(6,1,5)
plot(W2/pi,abs(W1));
grid
xlabel('頻率');
ylabel('幅度');
subplot(6,1,6);
plot(W2/pi,20*log10(abs(W1)));
grid
xlabel('頻率');
ylabel('幅度(dB)');
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -