Am I doing something wrong, or does fdesign.octave not actually work?

2 views (last 30 days)
I'm trying to make a third-octave filter bank with specific features. As an introduction to the Matlab functions, I tried the example offered by the Matlab help for fdesign.octave. The self-generated code doesn't generate an ANSI-compliant filter at 1000 Hz (the filter response goes outside the skirts and they are shown in red). I've tried two other sampling rates and changed the filter order to 8, but still no success. What is up with this feature? Not fully functional?
%%Design an Octave Band Filter
% Design a sixth order, octave-band class 0 filter with a center frequency
% of 1000 Hz and, a sampling frequency of 44.1 kHz.
d = fdesign.octave(3,'Class 0','N,F0',6,1000,44100)
Hd = design(d)
fvtool(Hd)
The figure shows the magnitude response plot of the filter. The logarithmic scale for frequency is automatically set by FVTool for the octave filters.

Accepted Answer

Puneet Rana
Puneet Rana on 23 Feb 2017
Hi Jerome,
The red color on the mask does not mean that the ANSI compliance is not met. When fdesign.octave is used with fvtool, the mask is just plotted as a reference. fvtool does not indicate that the compliance is met through a change in the mask color. I can see how the color of the mask can be confusing.
fdesign.octave does not have a way to check ANSI compliance other than visually observing that the response is plotted between the upper and lower masks on fvtool. This, along with other improvements, is the reason why fdesign.octave has been superseded by the new octaveFilter System object. You can use isStandardCompliance method of octaveFilter to check ANSI compliance. It also plots the mask in green in those cases.
  1 Comment
Jerome
Jerome on 24 Feb 2017
Thanks, I can see that it works under close inspection now. At some zoom settings, the curve seems to go outside the envelope, but it actually doesn't.

Sign in to comment.

More Answers (0)

Categories

Find more on Measurements and Spatial Audio in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!