Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: zero phase low pass filter - filtfilt and IFIR
Replies: 9   Last Post: May 15, 2013 4:25 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yow Cheong Kok

Posts: 36
Registered: 6/19/06
Re: zero phase low pass filter - filtfilt and IFIR
Posted: Dec 20, 2009 2:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks Wayne,

As suggested by you, I have changed to the correct sampling frequency and added a parameter for Fs in wavwrite. It is working now as follows:

[Data, Fs] = wavread('c:\wav\sample.wav');
Hd = fdesign.lowpass('Fp,Fst,Ap,Ast',4000,4200,0.5,60,Fs);
D = design(Hd,'equiripple');
FiltSpeech = filtfilt(D.Numerator,1,Data);
% Now compare
soundsc(Data,Fs);
% and
soundsc(FiltSpeech,Fs);
wavwrite(FiltSpeech, Fs, 'c:\wav\filter\sample_new.wav');

regards,
Yow



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.