Contenido principal

audioBandwidthSpecification

Audio bandwidth specifications

Since R2026a

    Description

    specs = audioBandwidthSpecification(options) converts audio parameters, options, into audio design specifications, specs.

    example

    Examples

    collapse all

    Use the audioBandwidthSpecification function to create a specification for a filter with a center frequency of 5000 Hz and a bandwidth of 500 Hz.

    First, display the analog specifications.

    spec = audioBandwidthSpecification(CenterFrequency=5000, ...
        Bandwidth=500,Domain="analog");
    disp(spec)
        CenterFrequency    Bandwidth    QualityFactor    OctaveBandwidth    CutoffFrequencies
        _______________    _________    _____________    _______________    _________________
    
             5000             500            10              0.14421        4756.2    5256.2 
    

    Then, display both the analog specification and the digital specification for a system with a sample rate of 16000 Hz.

    spec = audioBandwidthSpecification(CenterFrequency=5000, ...
        Bandwidth=500,SampleRate=16000, ...
        Domain="analog and digital");
    disp(spec)
         CenterFrequency         Bandwidth          QualityFactor       OctaveBandwidth               CutoffFrequencies          
        _________________    _________________    _________________    __________________    ____________________________________
    
        Analog    Digital    Analog    Digital    Analog    Digital    Analog     Digital         Analog             Digital     
        ______    _______    ______    _______    ______    _______    _______    _______    ________________    ________________
                                                                                                                                 
         5000      5000       500        500        10        10       0.14421    0.14454    4756.2    5256.2    4744.9    5244.9
    

    Input Arguments

    collapse all

    Conversion options, specified as a comma-separated list of name-value arguments. You do not need to specify all possible name-value arguments.

    Options

    OptionTypeDefault
    CenterFrequency1-by-P vector of positive scalars 
    Bandwidth1-by-P vector of positive scalars 
    QualityFactor1-by-P vector of positive scalars 
    OctaveBandwidth1-by-P vector of positive scalars 
    CutoffFrequencies
    • 1-by-2 vector of positive values specifying [low-frequency cutoff,high-frequencycutoff]

    • 2-by-P matrix of positive values with each column representing [low-frequency cutoff,high-frequency cutoff].

     
    Domain
    • "analog and digital"

    • "analog"

    • "digital"

    "analog and digital"
    SampleRatePositive scalar2

    P is the number of designs.

    You must specify some name-value with other name-value arguments:

    1. CenterFrequency and Bandwidth

    2. CenterFrequency and QualityFactor

    3. CenterFrequency and OctaveBandwidth

    Example: spec = audioBandwidthSpecification(CenterFrequency=1000,SampleRate=16e3,Bandwidth=120)

    Output Arguments

    collapse all

    Conversion specifications, returned as a MATLAB table.

    The output is a table displaying CenterFrequency, Bandwidth, QualityFactor, OctaveBandwidth, and CutoffFrequencies in analog or digital form depending on the value specified by Domain.

    Extended Capabilities

    expand all

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

    Version History

    Introduced in R2026a