coder.descriptor.types.Fixed Class
Namespace: coder.descriptor.types
Superclasses: coder.descriptor.types.Numeric
Description
An object of the coder.descriptor.types.Fixed
class describes a variable in
the generated code that is of a fixed-point type.
Properties
Name of the variable in the generated code for the corresponding modeling element, specified as a character vector.
Data Types: char
Name of the data type that is represented in Simulink for the corresponding modeling element, specified as a character vector.
Data Types: char
Indication that the type qualifier contains const
, specified as
a numeric or logical 1
(true
) or
0
(false
). If you cannot change the value
of the variable during execution, the variable is preceded by the
const
keyword as the type qualifier in the generated code.
1
— The type qualifier containsconst
.0
— The type qualifier does not containconst
.
Data Types: logical
Indication that the type qualifier contains volatile
, specified
as a numeric or logical 1
(true
) or
0
(false
). If the compiler cannot apply
optimizations to the variable because its value can change due to external sources,
the variable is preceded by the volatile
keyword as the type
qualifier in the generated code.
1
— The type qualifier containsvolatile
.0
— The type qualifier does not containvolatile
.
Data Types: logical
Word size of a numeric data type, specified as an integer number of bits.
Data Types: int32
Indication that the data type is signed, specified as a numeric or logical
1
(true
) if signed or 0
(false
) if unsigned.
Data Types: logical
Bias of the scaling, specified as a double.
The slope and the bias determine the scaling of a fixed-point number.
Data Types: double
Data type name and scaling mode, specified as a character vector with one of these values:
'Fixed-point: binary point scaling'
– Fixed-point data type and scaling defined by the word length and fraction length'Fixed-point: slope and bias scaling'
– Fixed-point data type and scaling defined by the slope and bias'Fixed-point: unspecified scaling'
– Fixed-point data type with unspecified scaling'Scaled double: binary point scaling'
– Double data type with fixed-point word length and fraction length information retained'Scaled double: slope and bias scaling'
– Double data type with fixed-point slope and bias information retained'Scaled double: unspecified scaling'
– Double data type with unspecified fixed-point scaling'Double'
– Built-indouble
'Single'
– Built-insingle
'Half'
– MATLAB® half-precision data type'Boolean'
– Built-inboolean
This value is derived from the slope and bias values.
Scaling of the data type, represented as a character vector with one of these values:
'BinaryPoint'
– Scaling for thenumerictype
object is defined by the fraction length.'SlopeBias'
– Scaling for thenumerictype
object is defined by the slope and bias.'Unspecified'
– Temporary setting that is only available atnumerictype
object creation, and allows for the automatic assignment of a best-precision binary point scaling.
Slope of the scaling, specified as a double.
The slope and the bias determine the scaling of a fixed-point number.
Data Types: double
Slope adjustment factor of a slope and bias scaled number, specified as a positive scalar.
The slope adjustment is equivalent to the fractional slope of a fixed-point number.
Data Types: double
Fixed exponent of a slope and bias scaled number, specified as an integer.
Data Types: int32
Fraction length, in bits, specified as an integer.
Fraction length can be greater than word length. For more information, see Binary Point Interpretation (Fixed-Point Designer).
Data Types: int32
Version History
Introduced in R2024a
See Also
coder.descriptor.types.Type
| coder.descriptor.types.Bool
| coder.descriptor.types.Double
| coder.descriptor.types.Single
| coder.descriptor.types.Half
| coder.descriptor.types.Integer
Topics
- Fixed-Point Numbers in Simulink (Fixed-Point Designer)
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: United States.
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)