Main Content

specifyall

Fully specify fixed-point filter System object settings

Description

example

specifyall(sysobj) sets all the data type fixed-point properties of the filter System object™ to 'Custom' so that you can easily specify all the fixed-point settings. If the object has a FullPrecisionOverride property, its value is set to false. specifyall is intended as a shortcut to changing all the fixed-point properties.

specifyall(sysobj,false) sets all fixed-point properties of the filter System object to their default values and sets the filter to full-precision mode, if one is available.

specifyall(sysobj,true) is equivalent to specifyall(sysobj).

Examples

collapse all

Use specifyall to access all the fixed-point settings of an FIR filter implemented with a direct-form structure. Using specifyall disables all automatic filter scaling and resets the mode values.

b = fircband(12,[0 0.4 0.5 1],[1 1 0 0],[1 0.2],{'w' 'c'});
firFilter = dsp.FIRFilter('Numerator',b);
get(firFilter)
ans = struct with fields:
                               Numerator: [0.0164 0.1031 -0.0632 -0.0907 0.0467 0.3139 0.4526 0.3139 0.0467 -0.0907 -0.0632 0.1031 0.0164]
                  ReflectionCoefficients: [0.5000 0.5000]
                       InitialConditions: 0
                         NumeratorSource: 'Property'
            ReflectionCoefficientsSource: 'Property'
                               Structure: 'Direct form'
                   FullPrecisionOverride: 1
                          RoundingMethod: 'Floor'
                          OverflowAction: 'Wrap'
                    CoefficientsDataType: 'Same word length as input'
          ReflectionCoefficientsDataType: 'Same word length as input'
              CustomCoefficientsDataType: [1x1 embedded.numerictype]
    CustomReflectionCoefficientsDataType: [1x1 embedded.numerictype]
                         ProductDataType: 'Full precision'
                   CustomProductDataType: [1x1 embedded.numerictype]
                     AccumulatorDataType: 'Full precision'
               CustomAccumulatorDataType: [1x1 embedded.numerictype]
                           StateDataType: 'Same as accumulator'
                     CustomStateDataType: [1x1 embedded.numerictype]
                          OutputDataType: 'Same as accumulator'
                    CustomOutputDataType: [1x1 embedded.numerictype]

The specifyall function sets all the data type fixed-point properties of the FIR filter to 'Custom'.

specifyall(firFilter)
get(firFilter)
ans = struct with fields:
                               Numerator: [0.0164 0.1031 -0.0632 -0.0907 0.0467 0.3139 0.4526 0.3139 0.0467 -0.0907 -0.0632 0.1031 0.0164]
                  ReflectionCoefficients: [0.5000 0.5000]
                       InitialConditions: 0
                         NumeratorSource: 'Property'
            ReflectionCoefficientsSource: 'Property'
                               Structure: 'Direct form'
                   FullPrecisionOverride: 0
                          RoundingMethod: 'Floor'
                          OverflowAction: 'Wrap'
                    CoefficientsDataType: 'Custom'
          ReflectionCoefficientsDataType: 'Custom'
              CustomCoefficientsDataType: [1x1 embedded.numerictype]
    CustomReflectionCoefficientsDataType: [1x1 embedded.numerictype]
                         ProductDataType: 'Custom'
                   CustomProductDataType: [1x1 embedded.numerictype]
                     AccumulatorDataType: 'Custom'
               CustomAccumulatorDataType: [1x1 embedded.numerictype]
                           StateDataType: 'Custom'
                     CustomStateDataType: [1x1 embedded.numerictype]
                          OutputDataType: 'Custom'
                    CustomOutputDataType: [1x1 embedded.numerictype]

Version History

Introduced in R2011a

expand all