Main Content

fi对象属性

The properties associated withfiobjects are described in the following sections in alphabetical order.

You can set these properties when you create afiobject. For example, to set the stored integer value of afiobject:

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

Note

Thefimathproperties andnumerictypeproperties are also properties of thefiobject. Refer tofimath Object Propertiesandnumerictype Object Propertiesfor more information.

bin

Stored integer value of afi对象binary.

data

Numerical real-world value of afiobject.

dec

Stored integer value of afi对象在小数。

double

Real-world value of afiobject stored as a MATLAB®double.

fimath

fimathproperties associated with afiobject.fimathproperties determine the rules for performing fixed-point arithmetic operations onfiobjects.fiobjects get theirfimathproperties from a localfimathobject or from default values. The factory-default fimath values have the following settings:

RoundingMethod: Nearest OverflowAction: Saturate ProductMode: FullPrecision SumMode: FullPrecision

To learn more aboutfimathobjects, refer tofimath Object Construction. For more information about each of thefimathobject properties, refer tofimath Object Properties.

hex

Stored integer value of afi对象hexadecimal.

int

Stored integer value of afiobject, stored in a built-in MATLAB integer data type.

NumericType

Thenumerictypeobject contains all the data type and scaling attributes of a fixed-point object. Thenumerictypeobject 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 thenumerictypeproperties of afiobject afterfiobject creation.

oct

Stored integer value of afi对象octal.

Value

Full-precision real world value of afiobject, stored as a character vector.