Azzera filtri
Azzera filtri

Is it possible to autmaticly switch between referenced model and subsystem in Simulink?

5 visualizzazioni (ultimi 30 giorni)
Suppose there is a referenced model in a top model in Simulink. Is it possible to change this model to a subsystem from command line? I can do it by "copy-paste" the content, however I need it to be done in an automatic way.

Risposta accettata

Ayush
Ayush il 5 Ott 2023
  1 Commento
Bartlomiej Stanczyk
Bartlomiej Stanczyk il 5 Ott 2023
Sorry for duplicating questions. In the meanime I have managed to extend the code provided in the answer you mentioned to work with models that involve more than one referenced model at the same level.
The whole difference in the code is to substitute the line
ref_block_path = getfullname(mdlRefsHandles);
with
ref_block_path = getfullname(mdlRefsHandles(k));

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Create Large-Scale Model Components in Help Center e File Exchange

Prodotti


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by