getInterpolationFactors

Get interpolation factors of each filter stage of digital upconverter

Description

example

M = getInterpolationFactors(upConv) returns a vector, M, with the interpolation factors of each filter stage of digital up converter upConv. If the first filter stage is bypassed, then M is a 1-by-2 vector that contains the interpolation factors of the second and third stages. If the first filter stage is not bypassed, then M is a 1-by-3 vector containing the interpolation factors of the first, second, and third filter stages.

Examples

collapse all

Get interpolation factors of each filter stage of a dsp.DigitalUpConverter System object™.

Create a dsp.DigitalUpConverter System object with the default settings. Using the getInterpolationFactors function, obtain the interpolation factors of each stage of the object.

upConv = dsp.DigitalUpConverter
upConv = 
  dsp.DigitalUpConverter with properties:

        InterpolationFactor: 100
         MinimumOrderDesign: true
                  Bandwidth: 200000
    StopbandFrequencySource: 'Auto'
             PassbandRipple: 0.1000
        StopbandAttenuation: 60
                 Oscillator: 'Sine wave'
            CenterFrequency: 14000000
                 SampleRate: 300000

  Show all properties

M = getInterpolationFactors(upConv) %#ok
M = 1×3

     2     2    25

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

When you set the InterpolationFactor property to a 1-by-2 vector, the object bypasses the first filter stage and sets the interpolation factor of the second and third filtering stages to the values in the first and second vector elements, respectively. The output of the getInterpolationFactors function is now a 1-by-2 vector.

upConv.InterpolationFactor = [10 10]
upConv = 
  dsp.DigitalUpConverter with properties:

        InterpolationFactor: [10 10]
         MinimumOrderDesign: true
                  Bandwidth: 200000
    StopbandFrequencySource: 'Auto'
             PassbandRipple: 0.1000
        StopbandAttenuation: 60
                 Oscillator: 'Sine wave'
            CenterFrequency: 14000000
                 SampleRate: 300000

  Show all properties

M = getInterpolationFactors(upConv)
M = 1×2

    10    10

Input Arguments

collapse all

Digital up converter, specified as a dsp.DigitalUpConverter System object.

Output Arguments

collapse all

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

Data Types: double

Introduced in R2012a