Main Content


Implementation cost of the complex bandpass decimator



c = cost(cbd) returns a structure, c, whose fields contain information about the computation cost of implementing the complex bandpass decimator object, cbd.


collapse all

Compute the implementation cost of a complex bandpass decimator using the cost function.

Create a dsp.ComplexBandpassDecimator object. Set the DecimationFactor to 12, the CenterFrequency to 5000 Hz, and the SampleRate to 44,100 Hz.

cbp = dsp.ComplexBandpassDecimator(12,5000,44100)
cbp = 
  dsp.ComplexBandpassDecimator with properties:

                CenterFrequency: 5000
                  Specification: 'Decimation factor'
               DecimationFactor: 12
            StopbandAttenuation: 80
                TransitionWidth: 100
    MinimizeComplexCoefficients: true
                     SampleRate: 44100

Compute the implementation cost of cbp using the cost function.

c = cost(cbp)
c = struct with fields:
                      NumCoefficients: 201
                            NumStates: 379
    RealMultiplicationsPerInputSample: 44.3333
          RealAdditionsPerInputSample: 43.8333

Input Arguments

collapse all

Filter System object, specified as a dsp.ComplexBandpassDecimator System object.

Output Arguments

collapse all

Cost estimate containing these fields:

Estimated Value



Number of filter coefficients (excluding coefficients with values 0, 1 or –1)


Number of filter states


Number of real multiplication operations performed for each input sample


Number of real addition operations performed for each input sample

The function assumes that a complex-by-complex multiplication requires 3 real multiplications and 5 real additions.

Version History

Introduced in R2018a