資源簡(jiǎn)介
通過對(duì)理想濾波器的加hanning窗實(shí)現(xiàn)濾波器設(shè)計(jì)
代碼片段和文件信息
clear;
clc;
N=15;
n=0:1:N-1;
wR=ones(1N);
wH=0.5*(1-cos(2*pi*n/(N-1)));
wH1=wR.*wH;
a=(N-1)/2;
hd=(sin(pi*0.25*(n-a+0.0000001)))./(pi*(n-a+0.0000001));
h1=hd.*wH1;
M=64;
H1=fft(h1M);
P=H1(1:32);
Q=H1(33:64);
H=[Q?P];
w1=0:1:M-1;
w1=w1*2*pi/64;
figure(4);
subplot(221)plot(w120*log10((abs(H))))title(‘Hanning幅頻曲線N=15‘);
grid
xlabel(‘w/rad‘)
ylabel(‘20lg|H(jw)|/dB‘)
subplot(222)plot(w1phase(H))title(‘
評(píng)論
共有 條評(píng)論