MATLAB: Find the order of a Butter-worth low pass filter in Matlab

butterworthiir filterlow-pass filterMATLAB

I have a Butter-worth low pass filter that I need to construct with the following specifications down below. The order of the filter is N = 11. I don't know how to construct such a filteri n Matlab. Can someone please help?
Fs = 44.1 Khz,
fpass = 1000 , αp = 1 dB , fstop = 2000 , αs = 60 dB
We are given an audio file- ("twoSounds.wav") to call in a MATlab f(x)
Load the file into the Matlab and filter it out using your constructed filter. Write your observation.

Best Answer

Start with the butter function and follow the links in and at the end of that documentation page.
Specifically note the discussion in Limitations, and use this implementattion of your filter (copied from the documentation, with slight editing):
% Zero-Pole-Gain design
[z,p,k] = butter(n,Wn,ftype);
[sos,g] = zp2sos(z,p,k);
Use the filtfilt function to do the actual filtering.