| Contents | Index |
F = fimath
F = fimath(...'PropertyName',PropertyValue...)
You can use the fimath constructor function in the following ways:
F = fimath creates a fimath object with the same properties as the current global fimath. The factory default configuration of the global fimath has the following properties:
RoundMode: nearest
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
You can request a handle object to the global fimath and change any of its property values using globalfimath. For more information about configuring the global fimath, see Working with the Global fimath in the Fixed-Point Toolbox User's Guide.
F = fimath(...'PropertyName',PropertyValue...) allows you to set the attributes of a fimath object using property name/property value pairs. All property names that you do not specify in the constructor get their values from the current global fimath.
The properties of the fimath object are listed below. These properties are described in detail in fimath Object Properties in the Properties Reference.
CastBeforeSum — Whether both operands are cast to the sum data type before addition
MaxProductWordLength — Maximum allowable word length for the product data type
MaxSumWordLength — Maximum allowable word length for the sum data type
OverflowMode — Overflow-handling mode
ProductBias — Bias of the product data type
ProductFixedExponent — Fixed exponent of the product data type
ProductFractionLength — Fraction length, in bits, of the product data type
ProductMode — Defines how the product data type is determined
ProductSlope — Slope of the product data type
ProductSlopeAdjustmentFactor — Slope adjustment factor of the product data type
ProductWordLength — Word length, in bits, of the product data type
RoundMode — Rounding mode
SumBias — Bias of the sum data type
SumFixedExponent — Fixed exponent of the sum data type
SumFractionLength — Fraction length, in bits, of the sum data type
SumMode — Defines how the sum data type is determined
SumSlope — Slope of the sum data type
SumSlopeAdjustmentFactor — Slope adjustment factor of the sum data type
SumWordLength — Word length, in bits, of the sum data type
Type
F = fimath
to create a default fimath object. If you are using the factory default setting of the global fimath, you get the following output:
F =
RoundMode: nearest
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
You can set properties of fimath objects at the time of object creation by including properties after the arguments of the fimath constructor function. For example, to set the overflow mode to saturate and the rounding mode to convergent,
F = fimath('OverflowMode','saturate',...
'RoundMode','convergent')
F =
RoundMode: convergent
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
fi | fipref | globalfimath | numerictype | quantizer | removeglobalfimathpref | resetglobalfimath | saveglobalfimathpref

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |