Main Content

getFilter

Return filter object with design parameters set

Description

example

filter = getFilter(obj) returns an dsp.SOSFilter object. The SOSMatrix and ScaleValues properties of the filter object are set as specified by the obj System object™.

Use getFilter for the design capabilities of the obj System object and the processing capabilities of the dsp.SOSFilter System object.

Examples

collapse all

Create an octaveFilter System object™. Call getFilter on your object to return a dsp.SOSFilter object with design parameters specified by your octaveFilter System object.

octFilt = octaveFilter;
biquad = getFilter(octFilt)
biquad = 
  dsp.SOSFilter with properties:

            Structure: 'Direct form II transposed'
    CoefficientSource: 'Property'
            Numerator: [3x3 double]
          Denominator: [3x3 double]
       HasScaleValues: false

  Use get to show all properties

Create a weightingFilter System object™.

weightFilt = weightingFilter;

Call getFilter on your object to return a dsp.SOSFilter object with design parameters specified by your weightingFilter System object. Use freqz to visualize the biquad filter.

biquad = getFilter(weightFilt)
biquad = 
  dsp.SOSFilter with properties:

            Structure: 'Direct form II transposed'
    CoefficientSource: 'Property'
            Numerator: [3x3 double]
          Denominator: [3x3 double]
       HasScaleValues: true
          ScaleValues: [4x1 double]

  Use get to show all properties

freqz(biquad)

Input Arguments

collapse all

System object that you want to get filter object from.

Output Arguments

collapse all

dsp.SOSFilter object.

Version History

Introduced in R2016b