Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Logically Executed Subsystems

Control the sequence of subsystem execution by evaluating a logical expression

A logically executed subsystem runs one or more times at the current time step when enabled by the signal from a control block. A control block implements control logic similar to that expressed by a programming language statement (e.g., if-then, while-do, switch, for).

Blocks

If Action Subsystem Represent subsystem whose execution is triggered by If block
If Model if-else control flow
Switch Case Action Subsystem Represent subsystem whose execution is triggered by Switch Case block
Switch Case Implement C-like switch control flow statement
Action Port Implement Action subsystems used in if and switch control flow statements
While Iterator Subsystem Represent subsystem that executes repeatedly while condition is satisfied during simulation time step
While Iterator Repeatedly execute contents of subsystem at current time step while condition is satisfied
For Iterator Subsystem Represent subsystem that executes repeatedly during simulation time step
For Iterator Repeatedly execute contents of subsystem at current time step until iteration variable exceeds specified iteration limit
For Each Subsystem Repeatedly perform algorithm on each element or subarray of input signal and concatenate results
For Each Enable blocks inside For Each Subsystem to process elements or subarrays of a mask parameter or input signal independently

Topics

Use Control Flow Logic

How to use control flow blocks to model control logic.

Action Subsystem

Create a subsystem that executes with a conditional control signal.

Repeat an Algorithm Using a For Each Subsystem

Iterate an algorithm over groups of signals, subsystems, and parameters.

Log Signals in For Each Subsystems

Use signal logging in For Each subsystems.

Was this topic helpful?