How to close Simulink model subsystems
23 views (last 30 days)
TAB on 14 Mar 2012
No need of using lots of variables & loop. Just find all the subsystems in the model and close them.
Doug Eastman on 13 Mar 2012
Assuming your top-level model is called TopModel you could use:
a = find_system('Parent','TopModel');
Pablo Romero on 14 Sep 2015
There is a small trick. You can load again the top-level of the system and save it (if requested).
open_system(bdroot); % Load the top-level
close_system(bdroot, 1); % Save and close the Model
Of course you can use your Modelname instead of bdroot.