numerictype of Fixed-Point Objects
Valid Values fornumerictype
Object Properties
Thenumerictype
object contains all the data type and scaling attributes of a fixed-point object. Thenumerictype
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 afi
object, any unspecified field of thenumerictype
object reverts to its default value. Thus, if theDataTypeMode
is set tounspecified scaling
,它默认为binary point scaling
when thefi
object is created. If theSignedness
property of thenumerictype
object is set toAuto
,它默认为Signed
when thefi
object is created.
DataTypeMode | DataType | Scaling | Signedness | Word- Length |
Fraction- Length |
Slope | Bias |
---|---|---|---|---|---|---|---|
Fixed-point data types |
|||||||
|
|
|
|
Positive integer from 1 to 65,535 |
积极或否定ative 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 |
积极或否定ative 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 thenumerictype
properties of afi
object afterfi
object creation.
Properties That Affect the Slope
TheSlopefield of thenumerictype
object is related to theSlopeAdjustmentFactor
andFixedExponent
properties by
TheFixedExponent
andFractionLength
properties are related by
If you set theSlopeAdjustmentFactor
,FixedExponent
, orFractionLength
property, theSlopefield is modified.
Stored Integer Value and Real World Value
In binary point scaling thenumerictype
StoredIntegerValue
andRealWorldValue
properties are related according to
In [Slope Bias] scaling theRealWorldValue
can be represented by
which is equivalent to
If any of these properties are updated, the others are modified accordingly.