What is the command line way in MATLAB to find the hierarchy of a signal name used in a Simulink model with subsystems ?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a Simulink model which consists of a top level model and subsystems. I use the same signal name in the toplevel model as well as within a subsystem. I would like to access the hierarchy of the signal name being used in my composite model, which will enable me to understand in which block the signal is existing.
Réponse acceptée
MathWorks Support Team
le 2 Fév 2011
In the attached example model below, use the following commands on your MATLAB command line in order to see the various levels in which the signal 'x2' is used.
The command line way to access where the signal 'x2' is used in a model with subsystems:
p = find_system(gcs,'FindAll','on','Type','line', 'SegmentType', 'trunk','Name','x2');
get(p(:), 'Parent');
The ouput yields the subsystem level hierarchy of the signal first and continues up to the top level usage of the signal in the composite model.
Analysing the output after updating the model and executing the commands mentioned above, 'x2' is used in the following levels:
'vdp_example/Subsystem'
'vdp_example'
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subsystems dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!