numerictype of Fixed-Point Objects
Valid Values for numerictype Object Properties
The numerictype object contains all the data type and scaling
attributes of a fixed-point object. The numerictype object behaves like
any MATLAB® object, except that it only lets you set valid values for defined fields. The
following table shows the possible settings of each field of the object.
Note
When you create a fi object, any unspecified field of the
numerictype object reverts to its default value. Thus, if the
DataTypeMode is set to unspecified scaling, it
defaults to binary point scaling when the fi object
is created. If the Signedness property of the
numerictype object is set to Auto, it defaults to
Signed when the fi object is created.
| DataTypeMode | DataType | Scaling | Signedness | Word- Length | Fraction- Length | Slope | Bias |
|---|---|---|---|---|---|---|---|
Fixed-point data types | |||||||
|
|
|
| Positive integer from 1 to 65,535 | Positive or negative integer | 2^(-fraction length) |
|
|
|
|
| Positive integer from 1 to 65,535 |
| Any floating- point number greater than zero | Any floating- point number |
|
|
|
| Positive integer from 1 to 65,535 |
|
|
|
Scaled double data types | |||||||
|
|
|
| Positive integer from 1 to 65,535 | Positive or negative integer | 2^(-fraction length) |
|
|
|
|
| Positive integer from 1 to 65,535 |
| Any floating- point number greater than zero | Any floating- point number |
|
|
|
| Positive integer from 1 to 65,535 |
|
|
|
Built-in data types | |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You cannot change the numerictype properties of a
fi object after fi object creation.
Properties That Affect the Slope
The Slope field of the numerictype
object is related to the SlopeAdjustmentFactor and
FixedExponent properties by
The FixedExponent and FractionLength properties
are related by
If you set the SlopeAdjustmentFactor,
FixedExponent, or FractionLength property, the
Slope field is modified.
Stored Integer Value and Real World Value
In binary point scaling the numerictype
StoredIntegerValue and RealWorldValue properties are
related according to
In [Slope Bias] scaling the RealWorldValue can be represented
by
which is equivalent to
If any of these properties are updated, the others are modified accordingly.