Digital Signal Processing Reference
In-Depth Information
Bild 20-27
Entwurf des FIR-Bandpassfilters (e) mit der Equiripple-Methode mit
fdatool
% Bandpass filtering of audio signal
% NumTP : impulse response of lowpass filter in workspace, s. fdatool
% NumBP : impulse resp. of bandpass filter in workspace, s. fdatool
% dsplab10_4.m * mw * 13Dec2010
[x,fs] = wavread(
'guitar'
);
% load audio signal
soundsc(x,fs)
fprintf(
'Sampling frequency %6g Hz\n'
,fs)
% pause(1)
%% Subsampling
x = conv(x,NumTP);
x = x(1:2:end);
x = conv(x,NumTP);
x = x(1:2:end);
%% Bandpass filtering
x = conv(x,NumBP2);
soundsc(x,fs/4)