Main Content

getFilters

Get crossover band filters

Since R2024b

    Description

    filters = getFilters(crossFilt) returns the individual filter objects for each band in the crossoverFilter object.

    example

    Examples

    collapse all

    Create a crossoverFilter object with 2 crossovers (3 bands), crossover frequencies at 500 Hz and 1 kHz, and a slope of 18 dB/octave.

    fs = 44100;
    crossFilt = crossoverFilter( ...
        NumCrossovers=2, ...
        CrossoverFrequencies=[500,1000], ...
        CrossoverSlopes=18, ...
        SampleRate=fs);

    Call the getFilters function on the object to get the individual band filter objects.

    filters = getFilters(crossFilt)
    filters=1×3 cell array
        {1x1 dsp.FilterCascade}    {1x1 dsp.FilterCascade}    {1x1 dsp.FilterCascade}
    
    

    Use filterAnalyzer to view and analyze the individual filters that make up the crossoverFilter object.

    filterAnalyzer(filters{1},filters{2},filters{3}, ...
        SampleRates=fs, ...
        FrequencyScale="log", ...
        FilterNames=["Band1","Band2","Band3"])

    Input Arguments

    collapse all

    Crossover filter, specified as a crossoverFilter object.

    Output Arguments

    collapse all

    Band filters of the crossover filter specified by crossFilt, specified as a cell array of N+1 filter objects, where N is NumCrossovers. The filter objects are returned as dsp.SOSFilter or dsp.FilterCascade objects. See Algorithms for more information about the design of the band filters.

    Version History

    Introduced in R2024b

    Go to top of page