fi对象属性
The properties associated withfi
objects are described in the following sections in alphabetical order.
You can set these properties when you create afi
object. For example, to set the stored integer value of afi
object:
x = fi(0,true,16,15,'int',4);
Note
Thefimath
properties andnumerictype
properties are also properties of thefi
object. Refer tofimath Object Propertiesandnumerictype Object Propertiesfor more information.
bin
Stored integer value of afi
对象binary.
data
Numerical real-world value of afi
object.
dec
Stored integer value of afi
对象在小数。
double
Real-world value of afi
object stored as a MATLAB®double
.
fimath
fimath
properties associated with afi
object.fimath
properties determine the rules for performing fixed-point arithmetic operations onfi
objects.fi
objects get theirfimath
properties from a localfimath
object or from default values. The factory-default fimath values have the following settings:
RoundingMethod: Nearest OverflowAction: Saturate ProductMode: FullPrecision SumMode: FullPrecision
To learn more aboutfimath
objects, refer tofimath Object Construction. For more information about each of thefimath
object properties, refer tofimath Object Properties.
hex
Stored integer value of afi
对象hexadecimal.
int
Stored integer value of afi
object, stored in a built-in MATLAB integer data type.
NumericType
Thenumerictype
object contains all the data type and scaling attributes of a fixed-point object. Thenumerictype
object behaves like any MATLAB structure, except that it only lets you set valid values for defined fields. For a table of the possible settings of each field of the structure, seeValid Values for numerictype Object Propertiesin the Fixed-Point Designer™ User's Guide.
Note
You cannot change thenumerictype
properties of afi
object afterfi
object creation.
oct
Stored integer value of afi
对象octal.
Value
Full-precision real world value of afi
object, stored as a character vector.