| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about 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, its initial output value can be either explicitly specified, or inherited from its input signal.
To explicitly specify an initial output value:
Select Dialog in the Source of initial output value drop-down list.
Specify the Initial output parameter.
If you select Dialog, you can also specify what happens to the output when the subsystem is disabled, using the Output when disabled drop-down menu. Select either:
reset – The output value is reset to the Initial output value when the subsystem is disabled.
held – The output value remains at its most recent value when the subsystem is disabled.
Note If you are connecting the output of the conditionally executed subsystem to a Merge block, set Output when disabled to held to ensure consistent simulation results. If you are using simplified initialization mode, you must select held when connecting a conditionally executed subsystem to a Merge block. For more information, see Underspecified initialization detection. |
The initial output value of the outport block can be inherited from the following sources:
Output port of another conditionally executed subsystem
Merge block (with Initial output specified)
Function-Call Model Reference block
Constant block (simplified initialization mode only)
IC block (simplified initialization mode only)
The procedure you use to inherit the initial conditions of the Outport block differs depending on whether you are using classic initialization mode or simplified initialization mode.
To inherit initial conditions in classic initialization mode:
Select Dialog in the Source of initial output value drop-down list.
Set the Initial output parameter to [] (empty matrix).
Click OK.
To inherit initial conditions in simplified initialization mode:
Select Input signal in the Source of initial output value drop-down list.
Click OK.
The Initial output and Output when disabled parameters are disabled, and the values are both inherited from the input signal.
For more information on classic and simplified initialization mode, see Underspecified initialization detection.
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)
A root level Outport of a model can accept a virtual bus only if all elements of the bus have the same data type. The Outport block automatically unifies the bus to a vector having the same number of elements as the bus, and outputs that vector.
If you want a root level Outport of a model to accept a bus signal that contains mixed types, you must select the Outport's Specify properties via bus object parameter and set the Outport's Bus object for validating input bus parameter to the name of a bus object that defines the type of bus that the Outport produces. If the bus signal is virtual, it will be converted to nonvirtual, as described in Automatic Bus Conversion. See Using Bus Objects more information.
An Outport in a conditionally executed subsystem that is connected to a bus that contains mixed data types cannot be configured to reset and have initial values specified.
The Outport block accepts complex or real signals of any data type supported by Simulink software. An Outport block can also accept fixed-point and enumerated data types if the block 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 box appears as follows:

The Signal Attributes pane of the Outport block dialog box appears as follows:

Display the Data Type Assistant.
The Data Type Assistant helps you set the Output data type parameter.
See Specifying Block Output Data Types for more information.
See Block-Specific Parameters for the command-line information.
Specify the port number of the block.
Default: 1
This parameter controls the order in which the port that corresponds to the block appears on the parent subsystem or model block.
See Block-Specific Parameters for the command-line information.
Specify the information to be displayed on the icon of this input port.
Default: Port number
Display the name of the signal connected to this port (or signals if the input is a bus).
Display port number of this port.
Display both the port number and the names of the signals connected to this port.
See Block-Specific Parameters for the command-line information.
Select the source of the initial output value of the Outport block.
Default: Dialog
The initial output value is specified by the Initial output parameter on the dialog.
The initial output value is inherited from the input signal.
If you are using classic initialization mode, you must select Dialog.
Selecting Input signal will cause
an error.
If you are using classic initialization mode and want to inherit the initial output value, set this parameter to Dialog, and then specify [] (empty matrix) for the Initial output value. For more information, see Inheriting Initial Conditions.
This parameter applies only if the Outport resides in an Enabled Subsystem.
Selecting Dialog enables the following parameters:
Output when disabled
Initial output
See Block-Specific Parameters for the command-line information.
Specify what happens to the block output when the subsystem is disabled.
Default: held
Output is held when the subsystem is disabled.
Output is reset when the subsystem is disabled.
If you are connecting the output of a conditionally executed subsystem to a Merge block, set Output when disabled to held to ensure consistent simulation results.
If you are using simplified initialization mode, you must select held when connecting a conditionally executed subsystem to a Merge block.
Selecting Dialog in Source of initial output value enables this parameter.
This parameter applies only if the Outport resides in an Enabled Subsystem.
See Block-Specific Parameters for the command-line information.
For conditionally executed subsystems, specify the block output before the subsystem executes and while it is disabled.
Default: [ ]
Simulink software does not allow the initial output of this block to be inf or NaN.
If you are using classic initialization mode, specify [] (empty matrix) to inherit the initial output value from the input signal. For more information, see Inheriting Initial Conditions.
You can also specify [] if you are using classic initialization mode, and your model does not depend on the initial output of the conditionally executed subsystem.
If you are using simplified initialization mode, you cannot specify [], you must specify an explicit value. If you do not want to specify an initial output value for this block, set Source of initial output value to Input signal.
Selecting Dialog in Source of initial output value enables this parameter.
This parameter applies only if the Outport resides in an Enabled Subsystem.
See Block-Specific Parameters for the command-line information.
Use a bus object to define the structure of the bus that is input or output by this block.
Default: Off
Use a bus object to define the structure of the bus that is input or output by this block.
Do not use a bus object to define the structure of the bus that is input or output by this block.
Selecting this parameter is required if the bus is nonvirtual (including a nonvirtual bus that was converted from a virtual bus as described in Automatic Bus Conversion) and is optional otherwise.
This parameter enables Bus object for validating input bus.
This parameter enables Output as nonvirtual bus in parent model.
See Block-Specific Parameters for the command-line information.
Specify the name of the bus object that defines the structure that a bus must have to connect to this port.
Default: BusObject
A bus object is an instance of class Simulink.Bus that is defined in the base workspace.
At the beginning of a simulation or when you update the model's diagram, Simulink software checks whether the bus connected to this port has the specified structure. If not, Simulink software displays an error message.
Specify properties via bus object enables this parameter.
See Block-Specific Parameters for the command-line information.
Select this parameter if you want the bus emerging in the parent model to be nonvirtual. The bus that is input to the port can be virtual or nonvirtual, regardless of the setting of Output as nonvirtual bus in parent model.
Default: Off
Select this parameter if you want the bus emerging in the parent model to be nonvirtual.
Clear this parameter if you want the bus emerging in the parent model to be virtual.
All signals in a nonvirtual bus must have the same sample time, even if the elements of the associated bus object specify inherited sample times. Any bus operation that would result in a nonvirtual bus that violates this requirement generates an error. Therefore, if you select this option all signals in the bus must have the same sample time. You can use a Rate Transition block to change the sample time of an individual signal, or of all signals in a bus, to allow the signal or bus to be included in a nonvirtual bus.
Specify properties via bus object enables this parameter.
See Block-Specific Parameters for the command-line information.
Specify the dimensions that a signal must have in order to be connected to this Outport block.
Default: -1
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. |
Clearing Specify properties via bus object enables this parameter.
See Block-Specific Parameters for the command-line information.
Specify the type of signals allowed out of this port.
Default: Inherit
Allow variable-size and fixed-size signals.
Do not allow variable-size signals.
Allow only variable-size signals.
When the signal at this port is a variable-size signal, the Port dimensions parameter specifies the maximum dimensions of the signal.
| Parameter: VarSizeSig |
| Type: string |
| Value: 'Inherit'| 'No' | 'Yes' |
| Default: 'Inherit' |
Enter the discrete interval between sample time hits or specify another appropriate sample time such as continuous or inherited.
Default: -1
By default, the block inherits its sample time based upon the context of the block within the model. To set a different sample time, enter a valid sample time based upon the table in Types of Sample Time.
See also How to Specify the Sample Time in the online documentation for more information.
See Block-Specific Parameters for the command-line information.
Select to lock the output data type setting of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor.
Default: Off
Locks the output data type setting for this block.
Allows the Fixed-Point Tool and the Fixed-Point Advisor to change the output data type setting for this block.
See Block-Specific Parameters for the command-line information.
For more information, see Fixed-Point Tool and Fixed-Point Advisor in the Simulink Fixed Point documentation.
Specify the numeric type of the signal output by this block.
Default: auto
Output the numeric type of the signal that is connected to its input.
Output 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.
Output 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.
See Block-Specific Parameters for the command-line information.
Specify the sampling mode (Sample based or Frame based) that the input signal must match.
Default: auto
Accept any sampling mode.
The output signal is sample-based.
The output signal is frame-based.
To generate frame-based signals, you must have the Signal Processing Blockset product installed.
See Block-Specific Parameters for the command-line information.
Specify the minimum value that the block should output.
Default: []
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
This number must be a double scalar value.
See Block-Specific Parameters for the command-line information.
Specify the maximum value that the block should output.
Default: []
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
This number must be a double scalar value.
See Block-Specific Parameters for the command-line information.
Specify the output data type of the external input.
Default: Inherit: auto
A rule that inherits a data type
Data type is double.
Data type is single.
Data type is int8.
Data type is uint8.
Data type is int16.
Data type is uint16.
Data type is int32.
Data type is uint32.
Data type is boolean.
Data type is fixed point fixdt(1,16,0).
Data type is fixed point fixdt(1,16,2^0,0).
Data type is enumerated.
The name of a data type object, for example Simulink.NumericType
This parameter can also be an expression that evaluates to a data type, for example, float('single')
See Block-Specific Parameters for the command-line information.
Select the category of data to specify.
Default: Inherit (Constant, Data Type Conversion, Discrete Time Integrator, Gain, Inport, Outport, Product, Saturation, Sum, Switch), Built in (Logical Operator, Relational Operator)
Inheritance rules for data types. Selecting Inherit enables a second menu/text box to the right. The following list is the possible values, which can vary by block:
Inherit from 'Constant value' (Constant block default)
Inherit via internal rule (Discrete-Time Integrator, Gain, Product, Sum, Switch block default)
Inherit via back propogation (Data Type Conversion block default)
auto (Inport, Outport block default)
Logical (see Configuration Parameters: Optimization)
Same as first input
Same as input (Saturation block default)
Same as accumulator
Built-in data types. Selecting Built in enables a second menu/text box to the right. The following list is the possible values, which can vary by block:
double (Constant, Data Type Conversion, Discrete-Time Integrator, Gain, Inport, Outport, Product, Saturation, Sum, Switch block default)
single
int8
uint8
int16
uint16
int32
uint32
boolean (Logical Operator, Relational Operator block default)
Fixed-point data types.
Enumerated data types. This option is available on some blocks. Selecting Enumerated enables a second menu/text box to the right. The following list is the possible values, which can vary by block:
<class name>
Expressions that evaluate to data types. Selecting Expression enables a second menu/text box to the right. The following list is the possible values, which can vary by block:
<data type expression>
Clicking the Show data type assistant button enables this parameter.
See Block-Specific Parameters for the command-line information.
See Using the Data Type Assistant in the Simulink User's Guide.
Specify whether you want the fixed-point data as signed or unsigned.
Default: Signed
Selecting Mode > Fixed point enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify the bit size of the word that holds the quantized integer.
Default: 16
Minimum: 0
Maximum: 32
Large word sizes represent large values with greater precision than small word sizes.
Selecting Mode > Fixed point enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify the method for scaling your fixed-point data to avoid overflow conditions and minimize quantization errors.
Default: Best precision (Constant), Binary point (Data Type Conversion, Discrete-Time Integrator, Gain, Inport, Outport, Product, Saturation, Sum, Switch), Integer (Logical Operator, Relational Operator)
Specify binary point location.
Enter slope and bias.
Specify best-precision values. This option appears for some blocks.
Specify integer. This setting has the same result as specifying a binary point location and setting fraction length to 0. This option appears for some blocks.
Selecting Mode > Fixed point enables this parameter.
Selecting Binary point enables:
Fraction length
Calculate Best-Precision Scaling
Selecting Slope and bias enables:
Slope
Bias
Calculate Best-Precision Scaling
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify fraction length for fixed-point data type.
Default: 0
Binary points can be positive or negative integers.
Selecting Scaling > Binary point enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify slope for the fixed-point data type.
Default: 2^0
Specify any positive real number.
Selecting Scaling > Slope and bias enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Specify bias for the fixed-point data type.
Default: 0
Specify any real number.
Selecting Scaling > Slope and bias enables this parameter.
See Block-Specific Parameters for the command-line information.
See Specifying a Fixed-Point Data Type in the Simulink User's Guide for more information.
Sample Time | Inherited from the driving block |
Dimensionalized | Yes |
Multidimensionalized | Yes |
Virtual | Yes, when the block resides in a subsystem block and not at the root level of a model For more information, see Virtual Blocks in the Simulink documentation. |
![]() | Mux | Permute Dimensions | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |