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 TableView data type support for Simulink blocks
Data Type ConversionConvert input signal to specified data type
Data Type Conversion InheritedConvert from one data type to another using inherited data type and scaling
Data Type DuplicateForce all inputs to same data type
Data Type PropagationSet data type and scaling of propagated signal based on information from reference signals
Data Type Scaling StripRemove scaling and map to built in integer


enumerationDisplay class enumeration members and names
Simulink.defineIntEnumTypeDefine enumerated data type information about enumerated data type
fixdtCreate Simulink.NumericType object describing fixed-point or floating-point data type
fixpt_evenspace_cleanupModify breakpoints of lookup table to have even spacing
fixpt_interp1Implement 1-D lookup table
fixpt_look1_func_approxOptimize fixed-point approximation of nonlinear function by interpolating lookup table data points
fixpt_look1_func_plotPlot fixed-point approximation function for lookup table
fixpt_set_allSet property for each fixed-point block in subsystem
fixptbestexpExponent that gives best precision for fixed-point representation of value
fixptbestprecDetermine maximum precision available for fixed-point representation of value
floatCreate Simulink.NumericType object describing floating-point data type
fxptdlgStart Fixed-Point Tool
num2fixptConvert number to nearest value representable by specified fixed-point data type
sfixCreate Simulink.NumericType object describing signed fixed-point data type
sfracCreate Simulink.NumericType object describing signed fractional data type
sintCreate Simulink.NumericType object describing signed integer data type
Simulink.importExternalCTypesGenerate Simulink representations of custom data types defined by C or C++ code
tunablevars2parameterobjectsCreate Simulink parameter objects from tunable parameters
ufixCreate Simulink.NumericType object describing unsigned fixed-point data type
ufracCreate Simulink.NumericType object describing unsigned fractional data type
uintCreate Simulink.NumericType object describing unsigned integer data type


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


Validate a Floating-Point Embedded Model

Use simulation to verify that a control algorithm can continue to meet application requirements while using single-precision floating-point data types.

Control Signal Data Types

Apply data types other than double to signals in a model.

Specify Fixed-Point Data Types

If you do not have Fixed-Point Designer™, you can still inspect and use fixed-point models that others share with you.

Specify Data Types Using Data Type Assistant

Interactively apply data types, such as integer, fixed-point, and enumerated types, to data items in a model.

Use Enumerated Data in Simulink Models

Create and use enumerations in Simulink models.

About Data Types in Simulink

Data items (signals, block parameters, and states) in a model have a data type, such as int8, which determines how a computer represents the data in memory.

Data Types Supported by Simulink

Simulink supports many floating-point, integer, fixed-point, Boolean, and other data types.

Data Types for Bus Signals

Specify a data type for an entire bus signal by creating a bus object. A bus signal is a single signal line that contains data for multiple individual signals.

Simulink Enumerations

Enumerated data is data that is restricted to a finite set of values. Simulink models can use an enumeration as a data type.

Related Information

Was this topic helpful?