Main Content

octavebw2bw

Convert octave bandwidth to linear bandwidth

Since R2026a

    Description

    cutoffsAnalog = octavebw2bw(N,fc) converts octave bandwidths N and band center frequencies fc into linear analog cutoff frequencies cutoffsAnalog.

    [cutoffsAnalog,cutoffsDigital] = octavebw2bw(N,fc,SampleRate=fs) returns the digital cutoff frequency cutoffsDigital when you specify a sample rate using SampleRate=fs.

    example

    Examples

    collapse all

    Convert a set of octave bands to their corresponding cutoff frequencies.

    First, define the octave bandwidths (N) and the octave band center frequencies (fc).

    N = [0.2 0.5 0.4];
    fc = [3000 4000 2500];

    Compute the analog cutoff frequencies (fcuta).

    fcuta = octavebw2bw(N,fc)
    fcuta = 2×3
    103 ×
    
        2.7991    3.3636    2.1764
        3.2153    4.7568    2.8717
    
    

    Provide a sample rate to additionally compute the digital cutoff frequencies (fcutd).

    fs = 16000;
    [fcuta,fcutd] = octavebw2bw(N,fc,SampleRate=16000)
    fcuta = 2×3
    103 ×
    
        2.7991    3.3636    2.1764
        3.2153    4.7568    2.8717
    
    
    fcutd = 2×3
    103 ×
    
        2.7957    3.3137    2.1692
        3.2114    4.6863    2.8622
    
    

    Input Arguments

    collapse all

    Octave bandwidths, specified as a 1-by-P positive-valued vector, where P is the number of filter designs. The octave bandwidth is the ratio of upper to lower limits of the bandwidth express as a power of two.

    Data Types: single | double

    Center frequencies, specified as a 1-by-P positive-valued vector, where P is the number of filter designs.

    Example: 1400.0

    Data Types: single | double

    Sample rate, specified as a positive scalar in Hz. The default value is 2. fc must be in the range [0,fs/2].

    Example: 16000.0

    Data Types: single | double

    Output Arguments

    collapse all

    Analog cutoff frequencies, returned as a 2-by-P positive-valued matrix.

    Example: 5000.0

    Data Types: single | double

    Digital cutoff frequencies in Hz, returned as a 2-by-P positive-valued matrix.

    Example: 5000.0

    Data Types: single | double

    Algorithms

    This function outputs both analog and digital band cutoff frequencies.

    • Analog cutoff frequencies depend on the quality factor Q derived from the octave bandwidth N by

      Q=2N2N1.

      The lower and upper band analog cutoff frequencies, cutoffsAnalog, are obtained from

      f1=fc(1+14Q212Q)f2=fc(1+14Q2+12Q)

      where fc is the band center frequency.

      Conversely, the octave bandwidth can be obtained from the ratio of f2/f1.

    • Digital cutoff frequencies cutoffsDigital are computed iteratively following the algorithms presented in equations 58-61 of [1].

    References

    [1] Orfanidis, Sophocles, "High-Order Digital Parametric Equalizer Design", J. Audio Eng. Soc, 53, 2005.

    Extended Capabilities

    expand all

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2026a