Data type refers to the format used to represent signal values internally. By default, the data type of Simulink® signals is double. You can create signals of other data types. Simulink signals support the same range of data types as MATLAB®. See About Data Types in Simulink for more information.
Simulink blocks can output one-dimensional, two-dimensional, or multidimensional signals. The Simulink user interface and documentation generally refer to 1-D signals as vectors and 2-D or multidimensional signals as matrices. A one-element array is frequently referred to as a scalar.
The size of a signal refers to the number of elements that a signal contains. The size of a matrix (2-D) signal is generally expressed as M-by-N, where M is the number of columns and N is the number of rows making up the signal. The size of a vector signal is referred to as the width of the signal.
For more information, see Signal Dimensions.
The values of signals can be complex numbers or real numbers. A signal whose values are complex numbers is a complex signal. Create a complex-valued signal using one of the following approaches:
Load complex-valued signal data from the MATLAB workspace into the model via a root-level Inport block.
Create a Constant block in your model and set its value to a complex number.
Create real signals corresponding to the real and imaginary parts of a complex signal, then combine the parts into a complex signal, using the Real-Imag to Complex conversion block.
Manipulate complex signals via blocks that accept them. If you are not sure whether a block accepts complex signals, see the documentation for the block.
If a signal does not have an explicit initial value, the initial value that Simulink uses depends on the data type of the signal.
|Signal Data Type||Default Initial Value|
|Numeric (other than fixed-point)||Zero|
|Fixed-point||Real-world ground value|
You can specify the non-default initial values of signals for Simulink to use at the beginning of simulation.
For any signal, you can define a signal object (
and use that signal object to specify an initial value for the
For details, see Initialize Signals and Discrete States.
You can use either blocks or the signal viewers (such as the Signal & Scope Manager) to display the values of signals during a simulation. For example, you can use either the Scope block or the Signal & Scope Manager to graph time-varying signals on an oscilloscope-like display during simulation. For general information about options for viewing signal values, see Scope Blocks and Scope Viewer Overview. For detailed information about:
Blocks that you can use to display signals in a model, see Sinks
Signal viewers, see Floating Scope and Scope Viewer Tasks
The Signal & Scope Manager, see Viewers and Generators Manager
To include graphical displays of signal values in a model diagram, use one of the following approaches:
For many blocks, Simulink can display block output (port values) as data tips on the block diagram while a simulation is running.
In the Simulink Editor, on the Debug tab, select Output Values , go to the Signal tab, and toggle on the Output Value Label > Toggle Value Displays button.
To change display options, use the Options submenu.
For details, see Display Port Values for Debugging.
To display, below a specific signal, the signal value after simulation:
Right-click the signal.
In the context menu, select Show Value Label of Selected Port.
You can save signal values to the MATLAB workspace during simulation, for later retrieval and postprocessing. For a summary of different approaches, see Approaches for Exporting Signal Data.