achehab
achehab

Reputation: 47

Matlab Buttord returning Wn > 1 why?

I am new to matlab and signals course, but i have a homework stating that I have to design a DT filter for Butterworth. I have these given parameters:

What I did:

[n, Wn] = buttord(2500*2*pi, 4000*2*pi, 3, 55, 's'); 
% Wn here is 1.5989e+04, I couldn't execute this without the 's' option.

[b, a] = butter(n, Wn)
The cutoff frequencies must be within the interval of (0,1).

Any answer please ?

Upvotes: 1

Views: 1673

Answers (1)

am304
am304

Reputation: 13876

Because you are using the 's' option, Wn is returned in rad/s, see the documentation. To use it with butter, you need to normalise by the sampling frequency, or don't use the 's' option:

fs = 2*pi*44100;
[b, a] = butter(n, Wn/fs);

or use butter with the 's' option as well:

[b,a] = butter(n,Wn,'s');

Upvotes: 1

Related Questions