Is it possible to run seperatly script in simulink, by double click on a subsystem

4 views (last 30 days)
Hello, I was wondering if it is possible to double click on a subsystem to run my script. I am creating a system, and want to plot subplots, but not all of them at the same time after run, so by adding different script to each minor system, and double click if I want to see the plots.
Is this possible?

Answers (1)

Sebastian Castro
Sebastian Castro on 4 Feb 2015
For any blocks (doesn't have to necessarily be Subsystems), you can register Block Callbacks.
In particular, the OpenFcn callback is where you can put code that executes when you double-click the block.
- Sebastian

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!