Main Content

quantizer Object Properties

The following properties of quantizer objects are always writable:

  • DataMode — Type of arithmetic used in quantization

  • Format — Data format of a quantizer object

  • OverflowAction — Action to take on overflow

  • RoundingMethod — Rounding method

See thefi Object Properties for more details about these properties, including their possible values.

For example, to create a fixed-point quantizer object with

  • The Format property value set to [16,14]

  • The OverflowAction property value set to 'Saturate'

  • The RoundingMethod property value set to 'Ceiling'

type

q = quantizer('DataMode','fixed','Format',[16,14],...
'OverflowMode','Saturate','RoundMode','Ceiling')
q =


        DataMode = fixed
       RoundMode = ceil
    OverflowMode = saturate
          Format = [16  14]

You do not have to include quantizer object property names when you set quantizer object property values.

For example, you can create quantizer object q from the previous example by typing

q = quantizer('fixed',[16,14],'Saturate','Ceiling')
q =


        DataMode = fixed
       RoundMode = ceil
    OverflowMode = saturate
          Format = [16  14]

Note

You do not have to include default property values when you construct a quantizer object. In this example, you could leave out 'fixed' and 'Saturate'.