Main Content

visualize

Display response of digital down converter or digital up converter filter cascade

Description

visualize(Conv) plots the magnitude response of the filter stages and the cascade response of a digital down converter or digital up converter, Conv. The function plots the response of the filters up to the second CIC null frequency (or to the first when only one CIC null exists).

visualize(Conv,Arithmetic=arithType) specifies the arithmetic type of the filter stages. Set input arithType to 'double', 'single', or 'fixed-point'. When the Conv object is in an unlocked state, you must specify the arithmetic type. When the Conv object is in a locked state, the object ignores the arithmetic input argument.

example

fvt = visualize(Conv) returns a handle to the MATLAB® figure displaying the magnitude response.

Examples

collapse all

Plot the magnitude response of the digital down converter using the visualize function.

Create a dsp.DigitalDownConverter System object with the default settings.

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

Using visualize

Using the visualize function, plot the magnitude response of the overall filter cascade and the magnitude response of the individual filter stages. Set the 'Arithmetic' property to 'fixed-point'.

visualize(dwnConv,Arithmetic='fixed-point')

Figure contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (Hz), ylabel Magnitude (dB) contains 8 objects of type line. These objects represent CIC decimator, Decimation factor = 25: Quantized, CIC decimator, Decimation factor = 25: Reference, CIC compensator, Decimation factor = 2: Quantized, CIC compensator, Decimation factor = 2: Reference, Halfband decimator, Decimation factor = 2: Quantized, Halfband decimator, Decimation factor = 2: Reference, Cascade response: Quantized, Cascade response: Reference.

Input Arguments

collapse all

Digital down converter or digital up converter, specified as a dsp.DigitalDownConverter or dsp.DigitalUpConverter System object™.

Arithmetic type of the filter stages, specified as 'double', 'single', or 'fixed-point'. When the Conv object is in an unlocked state, you must specify the arithmetic type. When the Conv object is in a locked state, the object ignores the arithmetic input argument.

Version History

Introduced in R2012a

expand all