| Simulink® | ![]() |
Ports & Subsystems, Sinks
Outport blocks are the links from a system to a destination outside the system.
Simulink® software assigns Outport block port numbers according to these rules:
It automatically numbers the Outport blocks within a top-level system or subsystem sequentially, starting with 1.
If you add an Outport block, it is assigned the next available number.
If you delete an Outport block, other port numbers are automatically renumbered to ensure that the Outport blocks are in sequence and that no numbers are omitted.
Outport blocks in a subsystem represent outputs from the subsystem. A signal arriving at an Outport block in a subsystem flows out of the associated output port on that Subsystem block. The Outport block associated with an output port on a Subsystem block is the block whose Port number parameter matches the relative position of the output port on the Subsystem block. For example, the Outport block whose Port number parameter is 1 sends its signal to the block connected to the topmost output port on the Subsystem block.
If you renumber the Port number of an Outport block, the block becomes connected to a different output port, although the block continues to send the signal to the same block outside the subsystem.
When you create a subsystem by selecting existing blocks, if more than one Outport block is included in the grouped blocks, Simulink software automatically renumbers the ports on the blocks.
The Outport block name appears in the Subsystem icon as a port label. To suppress display of the label, select the Outport block and choose Hide Name from the Format menu.
When an Outport block is in an enabled subsystem, you can specify what happens to its output when the subsystem is disabled: it can be reset to an initial value or held at its most recent value. The Output when disabled pop-up menu provides these options. The Initial output parameter is the value of the output before the subsystem executes and, if the reset option is chosen, while the subsystem is disabled.
Outport blocks in a top-level system have two uses: to supply external outputs to the workspace, which you can do by using either the Configuration Parameters dialog box or the sim command, and to provide a means for analysis functions to obtain output from the system.
To supply external outputs to the workspace, use the Configuration Parameters dialog box (see Exporting Output Data to the MATLAB Workspace) or the sim command (see sim). For example, if a system has more than one Outport block and the save format is array, the following command
[t,x,y] = sim(...);
writes y as a matrix, with each column containing data for a different Outport block. The column order matches the order of the port numbers for the Outport blocks.
If you specify more than one variable name after the second (state) argument, data from each Outport block is written to a different variable. For example, if the system has two Outport blocks, to save data from Outport block 1 to speed and the data from Outport block 2 to dist, you could specify this command:
[t,x,speed,dist] = sim(...);
To provide a means for the linmod and trim analysis functions to obtain output from the system (see Linearizing Models)
The Outport block accepts complex or real signals of any data type supported by Simulink software. An Outport block can also accept fixed-point data types if it is not a root-level output port. The complexity and data type of the block's output are the same as those of its input. For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink® in the Simulink documentation.
The elements of a signal array connected to an Outport block can be of differing complexity and data types except in the following circumstance: If the output port is in a conditionally executed subsystem and the initial output is specified, all elements of an input array must be of the same complexity and data types.
Typical Simulink data type conversion rules apply to an output port's Initial output parameter. If the initial output value is in the range of the block's output data type, Simulink software converts the initial output to the output data type. If the specified initial output is out of the range of the output data type, Simulink software halts the simulation and signals an error.
The Main pane of the Outport block dialog appears as follows:

Specify the port number of the Outport block.
Specify the information to be displayed on the icon of this Outport block. The options are:
Port number | Displays port number of this Outport block. |
Signal name | Displays the name of the signal connected to this Outport block (or signals if a bus is connected to this block). |
Port name and signal name | Displays both the port number and the name or names of the signals connected to this Outport block. |
This option is enabled only if the Outport resides in an Enabled Subsystem. It specifies what happens to the block output when the system is disabled.
For conditionally executed subsystems, specify the block output before the subsystem executes and while it is disabled. You can specify [] if your model does not depend on the initial output of the conditionally executed subsystem. Simulink software does not allow the initial output of this block to be inf or NaN.
The Signal Attributes pane of the Output block dialog appears as follows:

Select this option to use a bus object (see Working with Data Objects and Simulink.Bus class in the online documentation) to define the properties of a bus connected to this Outport block.
Specifies the name of the bus object that defines the structure that a bus must have to be connected to this Outport block. At the beginning of a simulation or when you update the model's diagram, Simulink software checks whether the bus connected to this block has the specified structure. If not, Simulink software displays an error message.
Select this option if you want code generated from this model to use a C structure to define the structure of the bus signal output by this block.
Specifies the dimensions that a signal must have in order to be connected to this Outport block. Valid values are:
-1 | A signal of any dimensions can be connected to this port. |
N | The signal connected to this port must be a vector of size N. |
[R C] | The signal connected to this port must be a matrix having R rows and C columns. |
Specify the sample time of this Outport block. See Specifying Sample Time in the online documentation for information on specifying sample times. The output of this block changes at the specified rate to reflect the value of its input.
Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:
Simulation range checking (see Checking Signal Ranges)
Automatic scaling of fixed-point data types
Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:
Simulation range checking (see Checking Signal Ranges)
Automatic scaling of fixed-point data types
Specify the output data type. You can set it to:
A rule that inherits a data type, for example, Inherit: auto
The name of a built-in data type, for example, single
The name of a data type object, for example, a Simulink.NumericType object
An expression that evaluates to a data type, for example, float('single')
Click the Show data type assistant button
to display the Data
Type Assistant, which helps you set the Data
type parameter.
See Specifying Block Output Data Types for more information.
Specifies the numeric type of the signal output by this block. The options are:
real | This Outport block outputs a real-valued signal. The signal connected to this block must be real. If it is not, Simulink software displays an error if you try to update the diagram or simulate the model that contains this block. |
complex | This Outport block outputs a complex signal. The signal connected to this block must be complex. If it is not, Simulink software displays an error if you try to update the diagram or simulate the model that contains this block. |
auto | This block outputs the numeric type of the signal that is connected to its input. |
Specify the sampling mode (Sample based or Frame based) that the input signal must match. To accept any sampling mode, set this parameter to auto. This parameter is intended to support signal processing applications based on Simulink models. See the documentation for the buffer function provided by Signal Processing Toolbox™ software or Frame-Based Signals in the Signal Processing Blockset™ documentation for information about frame-based signals.
Sample Time | Inherited from driving block |
Dimensionalized | Yes |
Multidimensionalized | Yes |
![]() | Mux | Permute Dimensions | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |