Documentation Center

  • Trial Software
  • Product Updates

Specify or Inherit Conditional Subsystem Initial Values

To initialize the input values of a conditional subsystem, initialize its Outport block, using one of these approaches:

  • Explicitly specify the initial values by listing them in the Block Parameters dialog box of the Outport block.

  • Inherit the initial values from the input signals.

    Note:   If the conditional subsystem is driving a Merge block in the same model, you do not need to specify an initial condition for the subsystem's Outport block.

Inherit Initial Values from the Input Signal

Valid sources for the Outport block to inherit its initial output value from are:

  • Output port of another conditionally executed subsystem

  • Merge block

  • Function-Call Model Reference block

  • Constant block (simplified initialization mode only)

  • IC block (simplified initialization mode only)

  • Stateflow® Chart

How you configure the Outport block for inheriting initial values depends on whether the model uses simplified or classic initialization mode. For details about initialization modes, see Set Initialization Mode to Simplified or Classic.

  • If you use simplified initialization mode, either set the Source of initial output value to Input signal or do the following:

    1. Set the Source of initial output value parameter to Dialog.

    2. In the Initial output parameter, enter an empty matrix ([]).

    3. Set Output when disabled parameter to held.

    If an initial condition source is not a valid source for inheriting an initial value, the Outport block uses the default initial value of the output data type. For more information, see Initialize Signals and Discrete States.

  • If you use classic initialization mode:

    1. Set the Source of initial output value parameter to Dialog.

    2. In the Initial output parameter, enter an empty matrix ([]).

    3. Set Output when disabled parameter to held.

Explicitly Specify an Initial Value

  1. For the Source of initial output value parameter, select Dialog.

  2. In the Initial output parameter, enter the initial value.

      Note:   In simplified initialization mode, do not specify an empty matrix ([]) or a Simulink.Signal object.

Was this topic helpful?