Subsystems
As a model increases in size and complexity, you can simplify it by grouping blocks into subsystems. A subsystem is a set of blocks that you group into a singleSubsystemblock.
Using subsystems:
Establishes a hierarchical block diagram, where aSubsystemblock is on one layer and the blocks that make up the subsystem are on another.
Keeps functionally related blocks together.
Helps reduce the number of blocks displayed in your model window.
Establishes an interface with inputs and outputs.
When you make a copy of a subsystem, that copy is independent of the source subsystem. To reuse the contents of a subsystem across a model or across models, consider referenced subsystems, referenced models, or subsystems linked to a block in a custom library. For more information, seeChoose Among Types of Model Components.
A subsystem can be virtual or nonvirtual. A virtual subsystem provides graphical hierarchy in a model and does not impact the execution of a model. A nonvirtual subsystem executes as a single unit within a model.
Blocks
Subsystem | Group blocks to create model hierarchy |
Functions
Tools
模型参考转换顾问 | Convert subsystems to referenced models |
Referenced Files Pane | View, save, and close referenced subsystems and models |
Topics
Subsystems
- Create Subsystems
How to create subsystems. - Expand Subsystem Contents
Flatten a model hierarchy by bringing the contents of a subsystem up one level. - Navigate Model Hierarchies
Navigate model hierarchy of subsystems and referenced models. - Preview Content of Model Components
Display representation of block contents on the face of a block.
Subsystem References
- Subsystem Reference
Save a subsystem in a separate file and reference it in a model. - Reference a Subsystem File in a Model
Use subsystem reference in a model. - Change Subsystem Reference Component Dynamically Using InitFcn
这个例子展示了如何dynamically change the subsystem reference component using the Initialization Function.