
- MATLAB Simulink Tutorial
- MATLAB Simulink - Home
- MATLAB Simulink - Introduction
- MATLAB Simulink - Environment Setup
- MATLAB Simulink - Starting Simulink
- MATLAB Simulink - Blocks
- MATLAB Simulink - Lines
- MATLAB Simulink - Build & Simulate Model
- MATLAB Simulink - Signals Processing
- MATLAB Simulink - Adding Delay To Signals
- MATLAB Simulink - Mathematical Library
- Build Model & Apply If-else Logic
- MATLAB Simulink - Logic Gates Model
- MATLAB Simulink - Sinewave
- MATLAB Simulink - Function
- MATLAB Simulink - Create Subsystem
- MATLAB Simulink - For Loop
- MATLAB Simulink - Export Data
- MATLAB Simulink - Script
- Solving Mathematical Equation
- First Order Differential Equation
- MATLAB Simulink Useful Resources
- MATLAB Simulink - Quick Guide
- MATLAB Simulink - Useful Resources
- MATLAB Simulink - Discussion
MATLAB Simulink - Create Subsystem
Subsystems are useful when your model gets big and complex. You can change a part of the model into a subsystem that helps to keep the flow very clean and understandable.
In this chapter, let us learn how to create a simple subsystem in Simulink. First, create a blank model, as shown below −

Now, we will create a simple model that adds two numbers and later converts a part of the model into a subsystem.

We have created a simple model that has two inputs. These inputs will add up and show the result inside the display.
We will change the value of the constant as 10 and 20. The result 10+20 = 30 should be seen inside the display block.

Let us add one more block named Unary minus that will change the output from 30 to -30 as shown below −

Now, let us select the portion i.e. the sum and the Unary minus block to create a subsystem as shown below −


Click on Create Subsystem. Once done, the sum block and the Unary minus block will be converted into a subsystem as shown below −

Now when you run the simulation, it will display the same result as earlier

Double click on the subsystem to see the original block as shown below −

Click on the upward arrow close to the subsystem to get back to the model.