To learn more about these properties, see fi Object Properties in
the Fixed-Point Designer™ Reference.

fimath Properties

In general, the fimath properties associated
with fi objects depend on how you create the fi object:

When you specify one or more fimath object
properties in the fi constructor, the resulting fi object
has a local fimath object.

When you do not specify any fimath object
properties in the fi constructor, the resulting fi object
has no local fimath.

To determine whether a fi object has a local fimath object,
use the isfimathlocal function.

The fimath properties associated with fi objects
determine how fixed-point arithmetic is performed. These fimath properties
can come from a local fimath object or from default fimath property
values. To learn more about fimath objects in fixed-point
arithmetic, see fimath Rules for Fixed-Point Arithmetic.

The following fimath properties are, by transitivity,
also properties of the fi object. You can set these
properties for individual fi objects. The following fimath properties
are always writable.

CastBeforeSum — Whether
both operands are cast to the sum data type before addition

Note:
This property is hidden when the SumMode is
set to FullPrecision.

The following numerictype properties are,
by transitivity, also properties of a fi object.
The following properties of the numerictype object
become read only after you create the fi object.
However, you can create a copy of a fi object with
new values specified for the numerictype properties:

Bias — Bias of a fi object

DataType — Data type category
associated with a fi object

DataTypeMode — Data type
and scaling mode of a fi object

FixedExponent — Fixed-point
exponent associated with a fi object

FractionLength — Fraction
length of the stored integer value of a fi object
in bits

Scaling — Fixed-point scaling
mode of a fi object

Signed — Whether a fi object
is signed or unsigned

Signedness — Whether a fi object
is signed or unsigned

Note:numerictype objects can have a Signedness of Auto,
but all fi objects must be Signed or Unsigned.
If a numerictype object with AutoSignedness is
used to create a fi object, the Signedness property
of the fi object automatically defaults to Signed.

Slope — Slope associated
with a fi object

SlopeAdjustmentFactor —
Slope adjustment associated with a fi object

WordLength — Word length
of the stored integer value of a fi object in bits

Setting fi Object Properties

You can set fi object properties in two ways:

Setting the properties when you create the object

Using direct property referencing

Setting Fixed-Point Properties at Object Creation

You can set properties of fi objects at the
time of object creation by including properties after the arguments
of the fi constructor function. For example, to
set the overflow action to Wrap and the rounding
method to Convergent,

To set the stored integer value of a fi object,
use the parameter/value pair for the 'int' property
when you create the object. For example, create a signed fi object
with a stored integer value of 4, 16-bit word length, and 15-bit fraction
length.

x = fi(0,1,16,15,'int',4);

Verify that the fi object has the expected
integer setting.

x.int

ans =
4

Using Direct Property Referencing with fi

You can reference directly into a property for setting or retrieving fi object
property values using MATLAB structure-like referencing. You
do so by using a period to index into a property by name.