specifyall

Fully specify fixed-point filter System object settings

Syntax

specifyall(sysobj)
specifyall(sysobj,false)
specifyall(sysobj,true)

Description

specifyall(sysobj) sets all the data type fixed-point properties of the filter System object™ sysobj 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 one by one.

specifyall(sysobj,false) sets all fixed-point properties of the filter System object sysobj 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

This example demonstrates using specifyall to provide access to all of the fixed-point settings of an FIR filter implemented with the direct-form structure. Using specifyall disables all of the automatic filter scaling and reset 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: [1x13 double]
                  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]

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

specifyall(firFilter)
get(firFilter)
ans = struct with fields:
                               Numerator: [1x13 double]
                  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]

See Also

Functions

Introduced in R2011a