Data Types

Assign specific data types to signals and block parameters, define enumerations

In models, data types determine the interactions between signals and block parameters. Numeric data types determine how a computer stores signals and parameters in memory and how a computer performs math operations. Other Simulink® data types determine the structure or allowed values of signals and parameters.

To simulate the mathematical behavior of computer hardware, or to generate efficient code from a model, you can control the numeric data types of signals and parameters. You can specify floating-point, integer, fixed-point, and other numeric types. See Data Types Supported by Simulink.

Enumerated data types allow signals and parameters to use only a set of values that you specify. You can improve model readability by providing a meaningful name for each enumerated value. To use enumerations in Simulink, see Use Enumerated Data in Simulink Models.

You can use bus types to group multiple signals or parameters together, which can improve model readability and ease model maintenance. See Data Types for Bus Signals.


Block Support Table View data type support for Simulink blocks
Data Type Conversion Convert input signal to specified data type
Data Type Conversion Inherited Convert from one data type to another using inherited data type and scaling
Data Type Duplicate Force all inputs to same data type
Data Type Propagation Set data type and scaling of propagated signal based on information from reference signals
Data Type Scaling Strip Remove scaling and map to built in integer


enumeration Display class enumeration members and names
fixdt Create Simulink.NumericType object describing fixed-point or floating-point data type
fixpt_evenspace_cleanup Modify breakpoints of lookup table to have even spacing
fixpt_interp1 Implement 1-D lookup table
fixpt_look1_func_approx Optimize fixed-point approximation of nonlinear function by interpolating lookup table data points
fixpt_look1_func_plot Plot fixed-point approximation function for lookup table
fixpt_set_all Set property for each fixed-point block in subsystem
fixptbestexp Exponent that gives best precision for fixed-point representation of value
fixptbestprec Determine maximum precision available for fixed-point representation of value
float Create Simulink.NumericType object describing floating-point data type
fxptdlg Start Fixed-Point Tool
num2fixpt Convert number to nearest value representable by specified fixed-point data type
sfix Create Simulink.NumericType object describing signed fixed-point data type
sfrac Create Simulink.NumericType object describing signed fractional data type
Simulink.defineIntEnumType Define enumerated data type Get information about enumerated data type
sint Create Simulink.NumericType object describing signed integer data type
tunablevars2parameterobjects Create Simulink parameter objects from tunable parameters
ufix Create Simulink.NumericType object describing unsigned fixed-point data type
ufrac Create Simulink.NumericType object describing unsigned fractional data type
uint Create Simulink.NumericType object describing unsigned integer data type


Simulink.AliasType Create alias for signal and parameter data type
Simulink.NumericType Specify floating point, integer, or fixed point data type

Related Information

Was this topic helpful?