numerictype Properties
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. Any
numerictype
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
Bias
— Bias associated with the object
0
(default) | floating-point number
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.
DataType
— Data type category
Fixed
(default) | double
| single
| boolean
| ScaledDouble
Data type category, specified as one of the following:
Fixed
— Fixed-point or integer data typedouble
— Built-in MATLAB®double
data typesingle
— Built-in MATLABsingle
data typeboolean
— Built-in MATLABboolean
data typeScaledDouble
— Scaled double data type
DataTypeMode
— Data type and scaling associated with the object
Fixed-point: binary point scaling
(default) | Fixed-point: slope and bias scaling
Fixed-point:
unspecified scaling
| Scaled double: binary point scaling
| Scaled double: slope and bias scaling
| Scaled double: unspecified scaling
| Double
| Single
| Boolean
Data type and scaling associated with the object, specified as one of the following:
Fixed-point: binary point scaling
— Fixed-point data type and scaling defined by the word length and fraction lengthFixed-point: slope and bias scaling
— Fixed-point data type and scaling defined by the slope and biasFixed-point: unspecified scaling
— Fixed-point data type with unspecified scalingScaled double: binary point scaling
— Double data type with fixed-point word length and fraction length information retainedScaled double: slope and bias scaling
— Double data type with fixed-point slope and bias information retainedScaled double: unspecified scaling
— Double data type with unspecified fixed-point scalingDouble
— Built-indouble
data typeSingle
— Built-insingle
data typeBoolean
— Built-inboolean
data type
For more details on these data types, see Valid Values for numerictype Object Properties.
FixedExponent
— Fixed-point exponent associated with the object
-15
(default) | integer
Fixed-point exponent associated with the object, specified as an integer.
Note
The FixedExponent
property is the negative of the
FractionLength
. Changing one property changes the other.
FractionLength
— Fraction length of the stored integer value in bits
best precision fraction length (default) | integer
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 the
FixedExponent
. Changing one property changes the other.
Scaling
— Scaling mode of the object
BinaryPoint
(default) | SlopeBias
| Unspecified
Scaling mode of the object, specified as one of the following:
BinaryPoint
(default) — Scaling for thefi
object is defined by the fraction length.SlopeBias
— Scaling for thefi
object is defined by the slope and bias.Unspecified
— Unspecified scaling. This is a temporary setting that is only allowed atfi
object creation to allow for the automatic assignment of a binary point best-precision scaling.
Signed
— Whether the object is signed (not recommended)
1
(true
) (default) | 0
(false
) | []
Whether the object is signed, specified as one of the following:
1
(true
) — Signed0
(false
) — Unsigned[]
— Auto
Note
The Signed
property is not recommended. Use
Signedness
instead. There are no plans to remove the
Signed
property.
Although the Signed
property is still supported, the
Signedness
property always appears in the
numerictype
object display. If you choose to change or set the
signedness of your numerictype
objects using the
Signed
property, MATLAB updates the corresponding value of the Signedness
property.
Signedness
— Whether the object is signed
Signed
(default) | Unsigned
| Auto
Whether the object is signed, specified as one of the following:
Signed
— SignedUnsigned
— UnsignedAuto
— Unspecified sign
Note
numerictype
objects can have a Signedness
of
Auto
, but all fi
objects must be
Signed
or Unsigned
. If a fi
object with Auto
Signedness
is used to create a fi
object, the
Signedness
property of the fi
object
automatically defaults to Signed
.
Slope
— Slope associated with the object
finite floating-point number greater than zero
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 2FixedExponentChanging one of these properties changes the other.
SlopeAdjustmentFactor
— Slope adjustment associated with the object
number greater than or equal to 1 and less than 2
Slope adjustment associated with the object, specified as a number greater than or equal to 1 and less than 2.
Note
Slope = SlopeAdjustmentFactor X 2FixedExponentChanging one of these properties changes the other.
WordLength
— Word length of the stored integer value in bits
16
(default) | positive integer if Signedness
is Unsigned
or
unspecified | integer greater than one if Signedness
is set to
Signed
Word length of the stored integer value in bits, specified as:
A positive integer if
Signedness
isUnsigned
or unspecifiedAn integer greater than one if
Signedness
is set toSigned
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)