B,A parameters in Shelving Filter design

Thank you in advance for your attention.
I guess that my question is quite easy but I just want to make sure that I am right...
I am trying to implement a shelving filter, and I have found a matlab command on the internet which does exactly what I need.
The problem is that my matlab release, 7.12 doesn´t recognize this command and I dont know what´s going on...
I know that other commands such as fdesign generates all kind of filters... but I need to get B and A coefficients of the filter specified.
Regards,
Luis.

5 commentaires

Amith Kamath
Amith Kamath le 14 Jan 2013
Going through the code in the link you've provided, it doesn't look like there is any function that could be Matlab version dependent. Could you please also include what error message you get when you run the code?
1.-When I try to ask for help on the command line...
">> help shelving
shelving not found.
Use the Help browser search field to search the documentation, or type "help help" for help command options, such as help for methods."
2.-When I try to execute directly this command with some values on its inputs...
>> [B,A]=shelving(5,0.2,40000,1,'Treble_Shelf');
??? Undefined function or method 'shelving' for input arguments of type 'double'.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[B,A] = shelving(G, Fc, Fs, Q, type);
G is the logrithmic gain (in dB)
FC is the center frequency
Fs is the sampling rate
Q adjusts the slope be replacing the sqrt(2) term
type is a character string defining filter type
Choices are: 'Base_Shelf' or 'Treble_Shelf'
Walter Roberson
Walter Roberson le 15 Jan 2013
Did you download the code from that link, and put it in a directory that is on your MATLAB path? You can use pathtool to adjust your MATLAB path.
Luis Gomez
Luis Gomez le 15 Jan 2013
Thank you so much Walter,
I didn´t notice that it was a function and I had to download and copy it in my workspace... I guess that it will work
John
John le 4 Mai 2014
Hello guys does anyone know what K = tan((pi * fc)/fs); (its in the code of shleving filter) thangs

Connectez-vous pour commenter.

Réponses (1)

John
John le 4 Mai 2014

0 votes

Hello guys does anyone know what K = tan((pi * fc)/fs); (its in the code of shleving filter) thangs

Commenté :

le 4 Mai 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by