Contenido principal

getFilter

R2026b

Return filter object with design parameters set

Description

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.

example

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: [3×3 double]
          Denominator: [3×3 double]
       HasScaleValues: false

  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: [3×3 double]
          Denominator: [3×3 double]
       HasScaleValues: true
          ScaleValues: [4×1 double]

  Show all properties

freqz(biquad)

Figure contains 2 axes objects. Axes object 1 with title Phase, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Phase (degrees) contains an object of type line. Axes object 2 with title Magnitude, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains an object of type line.

Input Arguments

collapse all

System object to get the filter object from.

Output Arguments

collapse all

Version History

Introduced in R2016b