clear all;clc;close all
N=33;wc=pi/2;
hd=ideal(N,wc);
w1=boxcar(N);
师宗三中w2=hamming(N);
w3=hanning(N);
w4=blackman(N);
h1=hd.*w1';
h2=hd.*w2';
h3=hd.*w3';
h4=hd.*w4';
M=512;
fh1=fft(h1,M);
db1=-20*log10(abs(fh1(1)./(abs(fh1)+eps)));
fh2=fft(h2,M);
db2=-20*log10(abs(fh2(1)./(abs(fh2)+eps)));
fh3=fft(h3,M);
db3=-20*log10(abs(fh3(1)./(abs(fh3)+eps)));
fh4=fft(h4,M);
db4=-20*log10(abs(fh4(1)./(abs(fh4)+eps)));
figure
subplot(2,2,1);stem(h1)
subplot(2,2,2);plot(w,abs(fh1))
subplot(2,2,3);plot(w,db1)
subplot(2,2,4);plot(w,angle(fh1))
figure
山水比德subplot(2,2,1);stem(h2)
subplot(2,2,2);plot(w,abs(fh2))
subplot(2,2,3);plot(w,db2)
subplot(2,2,4);plot(w,angle(fh2))
figure
subplot(2,2,1);stem(h3)
subplot(2,2,2);plot(w,abs(fh3))
氧化锌油subplot(2,2,3);plot(w,db3)
subplot(2,2,4);plot(w,angle(fh3))
figure
subplot(2,2,1);stem(h4)
subplot(2,2,2);plot(w,abs(fh4))
subplot(2,2,3);plot(w,db4)
subplot(2,2,4);plot(w,angle(fh4))
N1=2048;
t=0:1/256:1/256*(N1-1);
x1=sin(100*pi*t)+sin(200*pi*t)+sin(300*pi*t);
figure
subplot(3,2,1);plot(x1(1:100))
F1x1=fft(x1,N1);
w=2/N1*[0:N1-1];
y1=conv(x1,h1);
subplot(3,2,2);plot(w,abs(F1x1))
subplot(3,2,3);plot(y1(1:100))
Fx2=fft(y1,N1)
subplot(3,2,4);plot(w,abs(Fx2))
y2=conv(x1,h4);
subplot(3,2,5);plot(y2(1:100))
Fx3=fft(y1,N1)
subplot(3,2,6);plot(w,abs(Fx3))
矩形窗滤波器:
海明窗滤波器:
汉宁窗滤波器:英雄本 电影 2017
布莱克曼窗滤波器: