Professional Documents
Culture Documents
Fir Low Pass Black Man Filter: % Read Noise Audio File
Fir Low Pass Black Man Filter: % Read Noise Audio File
%Filter specification
fs=3000;
fp=4000;
deltap=0.1;
detlas=70;
% FIR filter design
N=264; % manual calculation
fc=(fs+fp)/2;
wc=fc/ft;%the value of wc
ft=48000; % ranging form 0 to 1
%Filter parameter
fp = 3000;
fs = 4000;
ft = 48000;
Rp = 0.1;
Rs = 70;
%Filter design
Wp = 2*fp/ft;
Ws = 2*fs/ft;
%FIR filtering process
[n,Wp] = cheb2ord(Wp,Ws,Rp,Rs);
[b,a] = cheby2(n,Rp,Wp,'high');
y= filter(b,a,yn);
yz=fft(y);
no=length(yz);
fy= (0:no-1)/no*(Fs);
figure (3);
plot((1:no/2)/no*Fs,abs(fyo(1:no/2)));
title ('Filtered Signal in Frequency Domain');
xlabel ('Hz');
ylabel ('Magnitude');
grid;
figure(4);
freqz(b,a)