Simulink works with different types of data for signals and block settings. These data types determine how numbers are stored in memory. This storage impacts their smallest and largest values. It also affects how exact they are. By default, Simulink uses the double type (double-precision floating point). However, you can choose other data types to make your model faster. Different data types can also use less memory or better match your hardware.
Floating-Point Data Types
Floating-point types represent real numbers, which include numbers with fractional parts. They provide a very large range. However, they have limited and varying precision.
| Data Type | Bits | Description | Approx. Min Value | Approx. Max Value |
| double | 64 | Double-precision floating point (IEEE 754) | ยฑ2.2ร10โ308 (min normalized) | ยฑ1.8ร10308 |
| single | 32 | Single-precision floating point (IEEE 754) | ยฑ1.2ร10โ38 (min normalized) | ยฑ3.4ร1038 |
| half | 16 | Half-precision floating point (requires Fixed-Point Designer) | ยฑ6.1ร10โ5 (min normalized) | ยฑ6.5ร104 |
Integer Data Types
Integer types are used to store whole numbers. Their range depends on how many bits they use and whether they are signed or unsigned. Signed integers can hold both negative and positive numbers, while unsigned integers can only hold positive numbers and zero.
| Data Type | Bits | Signed/Unsigned | Min Value | Max Value |
| int8 | 8 | Signed | -128 | 127 |
| uint8 | 8 | Unsigned | 0 | 255 |
| int16 | 16 | Signed | -32,768 | 32,767 |
| uint16 | 16 | Unsigned | 0 | 65,535 |
| int32 | 32 | Signed | -2,147,483,648 | 2,147,483,647 |
| uint32 | 32 | Unsigned | 0 | 4,294,967,295 |
| int64 | 64 | Signed | โ9,223,372,036,854,775,808 | 9,223,372,036,854,775,807 |
| uint64 | 64 | Unsigned | 0 | 18,446,744,073,709,551,615 |
Other Data Types
Simulink also supports non-numeric and specialized types:
| Data Type | Description |
| boolean | Logical data type, representing true (1) or false (0). |
| string | For representing text data. |
| Fixed-Point | Custom data types are defined by a signedness. They also have a word length (total bits) and scaling. These elements determine the binary point location and value range. You must use the Fixed-Point Designer for full control and analysis. |
| Enumerated | User-defined data types restricted to a finite set of named values. |
| Bus | Structured data types that group multiple signals or parameters. |
Importance of Range and Saturation
When using integer or fixed-point data types in Simulink, it is important to consider their minimum and maximum values. This is necessary to avoid overflow errors. If a calculation results in a value outside this range, Simulink offers two main ways to handle it:
- “Saturate,” which limits the result to the closest representable value within the range.
- “Wrap,” where the result cycles around to the other end of the range. For example, an 8-bit signed integer 127 + 1 becomes -128.
This approach helps manage data safely within the limits of the chosen data type.
Integer and Fixed-Point Overflow Handling
- Saturate clamps outputs to the min or max value allowed by the data type to prevent overflow.
- Wrap causes the output to loop around within the data type range, e.g., an 8-bit signed integer max of 127 wraps to -128 on overflow.
- Users can select overflow behaviour in block settings. This is possible in blocks like the Data Type Conversion block. Enable the “Saturate on integer overflow” option to do so.

