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: Filtering of audio signal
Replies: 1   Last Post: Dec 27, 2013 7:33 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,655
Registered: 2/7/05
Re: Filtering of audio signal
Posted: Dec 27, 2013 7:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 12/27/2013 4:32 AM, Djordje wrote:
> Hello everybody,
>
> I have some question, think you can help.
> I have this code that I use for filtering some audio samples. I did it
>well in older versions of Matlab, but in the new versions I have this error message:
>
> Error using buttord (line 64)
> The cutoff frequencies must be within the interval of (0,1).
>
> I tried everything but unsuccessfuly...The code is:
>
> Ts=1/Fs;
> fp=f1/2-500;
> wp=2*pi*fp;
> fs=f1-1300;
> ws=2*pi*fs;
> rp=1;
> rs=90;
>
> [N, wn] = buttord(wp, ws, rp, rs);
> [bnum, bden] = butter(N, wn);
> [numd, dend] = impinvar(bnum, bden, 1/Ts);
>
> f1 and f2 are the frequencies from audio signal. And once again, it did well in
>older version of Matlab, but in new one (2012) I get this error...
>


Try doing it this way:

wp=2*pi*fp/Fs;
ws=2*pi*fs/Fs;

Where fp is the passband freq in Hz, and fs is stopband
in Hz, and Fs is Sampling frequency in Hz.

You did not give what values you used for your f1 and Fs and so one
can't help you more. cut-off frequencies has to be in 0,1
range offocurse.

--Nasser



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.