Main Content

getDecimationFactors

Get decimation factors of each filter stage of a digital down converter

Description

M = getDecimationFactors(dwnConv) returns a vector, M, with the decimation factors of each filter stage of the digital down converter, dwnConv. If the third filter stage is bypassed, then M is a 1-by-2 vector containing the decimation factors of the first and second filter stages. If the third filter stage is not bypassed, then M is a 1-by-3 vector containing the decimation factors of the first, second, and third filter stages.

example

Examples

collapse all

Get decimation factors of each filter stage of the dsp.DigitalDownConverter System object™.

Create a dsp.DigitalDownConverter System object with the default settings. Using the getDecimationFactors function, obtain the decimation factors of each stage of the object.

dwnConv = dsp.DigitalDownConverter
dwnConv = 
  dsp.DigitalDownConverter with properties:

           DecimationFactor: 100
         MinimumOrderDesign: true
                  Bandwidth: 200000
    StopbandFrequencySource: 'Auto'
             PassbandRipple: 0.1000
        StopbandAttenuation: 60
                 Oscillator: 'Sine wave'
            CenterFrequency: 14000000
        NormalizedFrequency: false
                 SampleRate: 30000000

  Use get to show all properties

M = getDecimationFactors(dwnConv) %#ok
M = 1×3

    25     2     2

The DecimationFactor property of the object is set to 100. The output M is by default a 1-by-3 vector, where each element in the vector is a factor of the overall decimation factor.

When you set the DecimationFactor to a 1-by-2 vector, the object bypasses the third filter stage and sets the decimation factor of the first and second filtering stages to the values in the first and second vector elements respectively.

dwnConv.DecimationFactor = [10 10]
dwnConv = 
  dsp.DigitalDownConverter with properties:

           DecimationFactor: [10 10]
         MinimumOrderDesign: true
                  Bandwidth: 200000
    StopbandFrequencySource: 'Auto'
             PassbandRipple: 0.1000
        StopbandAttenuation: 60
                 Oscillator: 'Sine wave'
            CenterFrequency: 14000000
        NormalizedFrequency: false
                 SampleRate: 30000000

  Use get to show all properties

M = getDecimationFactors(dwnConv)
M = 1×2

    10    10

The output of the getDecimationFactors function is now a 1-by-2 vector.

Input Arguments

collapse all

Digital down converter, specified as a dsp.DigitalDownConverter System object™.

Output Arguments

collapse all

Decimation factors of each filter stage, returned as a 1-by-2 or a 1-by-3 vector. If the third filter stage is bypassed, then M is a 1-by-2 vector containing the decimation factors of the first and second filter stages. If the third filter stage is not bypassed, then M is a 1-by-3 vector containing the decimation factors of the first, second, and third filter stages.

Data Types: double

Version History

Introduced in R2012a