Академический Документы
Профессиональный Документы
Культура Документы
filter bank
clc;
clear all;
close all;
N=20;
n=0:1:N-1;
x=ones(1,N);
%plot the input
figure
stem(n,x);
lfft=256;
X1=fft(x,lfft);
X2=real(X1);
%plot thr fft of the input
figure
X2=[(X2(lfft/2:lfft)),X2(1:(lfft/2)-1)];
plot(X2);
%plot the absolute value of the fft of the input
Xf=20*(log10(abs(X1)));
Xf=[(Xf(lfft/2:lfft)),Xf(1:(lfft/2)-1)];
figure
plot(Xf)
k=-100:100;
m=k/100*pi;
X=x*exp(-1j*(n')*m);
figure
plot(m,abs(real(X)));hold on
% plot filter bank
for i=1:N-1
X=x*exp(-1j*(n')*(m+2*i*pi/N));
plot(m,abs(real(X)),'--');
end