Simulink functions to make dynamic programmation easier
Work from Matlab 2011b, developed on Matlab 2014b.
This class offers several methods that will facilitate your life while dynamically coding a Simulink subsystem. Each instance of the class is linked to a particular subsystem.
It redefine several native function in a more user-friendly way, but also add more complex functionalities.
It will allow you to:
- Add, delete lines in a secure way, remove all connection to a single block
- Get list of ports names and handle for a specific block
- Get list of connected lines to a specific block, only the part of the line connected is returned, so you can delete it without harming the others connections if the line is shared
- Get block handle in a safe way
- Add, delete block and its connections in a safe way
- Delete sources of a specific block, single or recursively (sources to sources)
- Position two blocks port to port
- Set size of the subsystem based on its in/out ports
- User friendly function to set port dimensions and constants values
Don't hesitate to ask me for evolution or bug fixes !
Cite As
Milan (2026). Simulink functions to make dynamic programmation easier (https://uk.mathworks.com/matlabcentral/fileexchange/59262-simulink-functions-to-make-dynamic-programmation-easier), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.