- First Order Differential Equation
- Solving Mathematical Equation
- MATLAB Simulink - Script
- MATLAB Simulink - Export Data
- MATLAB Simulink - For Loop
- MATLAB Simulink - Create Subsystem
- MATLAB Simulink - Function
- MATLAB Simulink - Sinewave
- MATLAB Simulink - Logic Gates Model
- Build Model & Apply If-else Logic
- MATLAB Simulink - Mathematical Library
- MATLAB Simulink - Adding Delay To Signals
- MATLAB Simulink - Signals Processing
- MATLAB Simulink - Build & Simulate Model
- MATLAB Simulink - Lines
- MATLAB Simulink - Blocks
- MATLAB Simulink - Starting Simulink
- MATLAB Simulink - Environment Setup
- MATLAB Simulink - Introduction
- MATLAB Simulink - Home
MATLAB Simulink Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MATLAB Simupnk - 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 Simupnk. 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 −


Cpck 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 earper

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

Cpck on the upward arrow close to the subsystem to get back to the model.
Advertisements