MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]显示波形的指令 (https://www.labfans.com/bbs/showthread.php?t=5827)

3866zyg 2008-12-14 00:25

[求助]显示波形的指令
 
用窗函数实现FIR滤波器代码如下


echo on
Length=101;
Fs=10000;
W=2000;
Ts=1/Fs;
n=-(Length-1)/2:(Length-1)/2;
t=Ts*n;
h=2*W*sinc(2*W*t);
N=61;
rec_windowed_h=h((Length-N)/2+1:(Length+N)/2);
[rec_windowed_H,W1]=freqz(rec_windowed_h,1);
rec_windowed_H_in_dB=20*log10(abs(rec_windowed_H)/abs(rec_windowed_H(1)));
hanning_window=hanning(N);
hanning_windowed_h=h((Length-N)/2+1:(Length+N)/2).*hanning_window.';
[hanning_windowed_H,W2]=freqz(hanning_windowed_h,1);
hanning_windowed_H_in_dB=20*log10(abs(hanning_windowed_H)/abs(hanning_windowed_H(1)));

请问高手 显示 “用矩形窗截断的滤波器的脉冲响应和频率响应” 波形的指令是什么 谢谢


所有时间均为北京时间。现在的时间是 12:34

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.