numerictype - Properties of the numerictype object - MATLAB (original) (raw)

Main Content

Properties of the numerictype object

numerictype object properties define the data type and scaling attributes of a fixed-point object. All properties of a numerictype object are writable. However, the numerictype properties of a fi object become read-only after the fi object has been created. Anynumerictype properties of a fi object that are unspecified at the time of fi object creation are automatically set to their default values.

numerictype Object Properties

expand all

Bias associated with the object, specified as a floating-point number. Along with the slope, the bias forms the scaling of a fixed-point number.

Data Types: single | double | half

Data type category, specified as one of the following:

Data Types: char

Data type and scaling associated with the object, specified as one of the following:

For more details on these data types, see Valid Values for numerictype Object Properties.

Data Types: char

Fixed-point exponent, specified as an integer.

Note

The FixedExponent property is the negative of theFractionLength. Changing one property changes the other.

Data Types: single | double | half | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Fraction length of the stored integer value in bits, specified as an integer. The default is the best precision fraction length based on the value of the object and the word length.

Note

The FractionLength property is the negative of theFixedExponent. Changing one property changes the other.

Data Types: single | double | half | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Scaling mode of the object, specified as one of the following:

Data Types: char

Whether the object is signed, specified as one of the following:

Note

The Signed property is not recommended. UseSignedness instead. There are no plans to remove theSigned property.

Although the Signed property is still supported, theSignedness property always appears in thenumerictype object display. If you choose to change or set the signedness of your numerictype objects using theSigned property, MATLAB updates the corresponding value of the Signedness property.

Data Types: logical

Whether the object is signed, specified as one of the following:

Note

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

Data Types: char

Slope associated with the object, specified as a finite floating-point number greater than zero. Along with the bias, the slope forms the scaling of a fixed-point number.

Note

Slope = SlopeAdjustmentFactor X 2_FixedExponent_ Changing one of these properties changes the other.

Data Types: single | double | half

Slope adjustment factor, specified as a double. The slope adjustment factor must be a value greater than or equal to 1 and less than 2.

Note

Slope = SlopeAdjustmentFactor X 2_FixedExponent_ Changing one of these properties changes the other.

Data Types: double

Word length of the stored integer value in bits, specified as:

Data Types: single | double | half | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Version History

Introduced before R2006a