Simulink.BlockDiagram.createSubsystem
Create subsystem containing specified set of blocks
Syntax
Description
Simulink.BlockDiagram.createSubsystem(
creates a subsystem and moves the specified blocks into it. All of the specified blocks must originally reside in the same block diagram.blocks
)
If any of the blocks have unconnected ports, the function creates and connectsInportandOutportblocks to them inside the subsystem.
If any of the blocks are input or output port blocks, the function createsInportandOutportblocks in the parent system to connect to the corresponding ports on the newSubsystemblock.
Simulink.BlockDiagram.createSubsystem()
replaces the currently selected blocks with a new subsystem that contains those blocks.
Simulink.BlockDiagram.createSubsystem(___,
specifies options using one or more name-value pair arguments in addition to the input arguments in previous syntaxes. For example,Name,Value
)'Name','MySubsystem'
names the new subsystem'MySubsystem'
.