Using Simulink | ![]() ![]() |
Block Support for Data and Numeric Signal Types
All Simulink blocks accept signals of type double
by default. Some blocks prefer boolean
input and others support multiple data types on their inputs. See Simulink Blocks in the online Simulink documentation for information on the data types supported by specific blocks for parameter and input and output values. If the documentation for a block does not specify a data type, the block inputs or outputs only data of type double
.
Specifying Block Parameter Data Types
When entering block parameters whose data type is user-specifiable, use the syntax
to specify the parameter, where type
is the name of the data type and value
is the parameter value. The following examples illustrate this syntax.
single(1.0) |
Specifies a single-precision value of 1.0 |
int8(2) |
Specifies an eight-bit integer of value 2 |
int32(3+2i) |
Specifies a complex value whose real and imaginary parts are 32-bit integers |
Creating Signals of a Specific Data Type
You can introduce a signal of a specific data type into a model in any of the following ways:
Displaying Port Data Types
To display the data types of ports in your model, select Port Data Types from Simulink's Format menu. Simulink does not update the port data type display when you change the data type of a diagram element. To refresh the display, type Ctrl+D.
![]() | Data Types Supported by Simulink | Data Type Propagation | ![]() |