Main Content

isStandardCompliant

Verify octave filter bank is ANSI S1.11-2004 compliant

Since R2021a

Description

[status,cf] = isStandardCompliant(ofb,ctype) indicates whether each filter in ofb is compliant with the minimum and maximum attenuation specifications of the ctype design specified in the ANSI S1.11-2004 standard. The function also returns a vector of center frequencies.

example

[statusall,cfref] = isStandardCompliant(ofb,ctype,'all') returns a scalar that is true only if all the filters in the filter bank are compliant.

example

Examples

collapse all

Use octaveFilterBank to design an octave filter bank. Use isStandardCompliant to verify if the designed octave filter bank is compliant with the ANSI S1.11-2004 standard.

Create an octaveFilterBank object composed of 12th-order 1-octave filters.

Call isStandardCompliant, specifying the compliance class type as 'class 0'. Display the compliance status and reference frequency for each filter.

ofb = octaveFilterBank('FilterOrder',12,'Bandwidth','1 octave');
[status,reffreq] = isStandardCompliant(ofb,'class 0')
status = 1x10 logical array

   1   1   1   1   1   1   1   1   1   1

reffreq = 1×10
104 ×

    0.0032    0.0063    0.0126    0.0251    0.0501    0.1000    0.1995    0.3981    0.7943    1.5849

Use the 'all' option to return compliance verification of the complete filter bank. The 'all' option also returns the ANSI reference frequency against which the function checks the mask.

ofb = octaveFilterBank('FilterOrder',12,'Bandwidth','1/3 octave');
[status,reffreq] = isStandardCompliant(ofb,'class 0','all')
status = logical
   1

reffreq = 
1000

Decrease the filter order to produce a noncompliant filter in the bank. Verify the last filter in the bank is noncompliant.

ofb = octaveFilterBank('FilterOrder',8);
status = isStandardCompliant(ofb,'class 1')
status = 1x10 logical array

   1   1   1   1   1   1   1   1   1   0

Use the 'all' option to verify noncompliance of the bank.

isStandardCompliant(ofb,'class 1','all')
ans = logical
   0

Input Arguments

collapse all

Input filter bank, specified as an octaveFilterBank object.

Compliance class type to verify, specified as 'class 0', 'class 1', or 'class 2'. For more information on ANSI S1.11-2004 compliant filter classes, see Octave-Band and Fractional Octave-Band Filters.

Data Types: char | string

Output Arguments

collapse all

Compliance status, returned as a logical vector. The compliance status indicates whether each filter in the object ofb is compliant with the ANSI S1.11-2004 standard for ctype.

Data Types: logical

Standard-compliant center frequencies, returned as a vector. The center frequencies are used to set the class attenuation limits.

Aggregate compliance status, returned as a logical scalar. statusall is true only if all the filters in the filter bank are compliant.

Data Types: logical

Standard-compliant reference frequency, returned as a scalar. The reference frequency is used to set the class attenuation limits.

Tips

  • To meet compliance, set the reference frequency of the octave filter bank to one of the values returned by the getANSICenterFrequencies(octaveFilter) method, increase the filter order, limit the frequency range, or increase the sample rate.

Version History

Introduced in R2021a