| Fixed-Point Toolbox™ | ![]() |
F = fimath
F = fimath(...'PropertyName',PropertyValue...)
You can use the fimath constructor function in the following ways:
F = fimath creates a default fimath object.
F = fimath(...'PropertyName',PropertyValue...) allows you to set the attributes of a fimath object using property name/property value pairs.
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.
F = fimath
F =
RoundMode: nearest
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
CastBeforeSum: true
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
CastBeforeSum: true
fi, fipref, numerictype, quantizer
![]() | fi | fipref | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |