Update subsystem's Block parameters for all the subsytems in a model.

There are more than a few subsystems in my model, and I would to check "treat as Atomic model" in block parameters for all of them, at once.

 Accepted Answer

h=find_system('ModelName','FindAll','on','BlockType','SubSystem')
set(h,'TreatAsAtomicUnit','On')
You might need to refine your search to avoid unintended SubSystem blocks.

3 Comments

Hi Jiang,
Thanks for the quick answer.
isn't there any option of chnaging the parameters on SImulink itself?
Thanks.
Regards,
Neal
If doing it interactively in Simulink GUI, it can only be done one subsystem block at a time.
Aah, that's a bummer. Thanks for the answer though, I really appreciate it. :)

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2021b

Community Treasure Hunt

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

Start Hunting!