check whether a Simulink handle is a block or model programmatically
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
giga
am 3 Feb. 2016
Beantwortet: Subhadra Mahanti
am 4 Feb. 2016
I have a handle to a block/model which I have retrieved programmatically. Is there a way (e.g. calling get_param) to programmatically figure out whether it's handle of a block or model (or of any other type)?
Thanks
0 Kommentare
Akzeptierte Antwort
Subhadra Mahanti
am 4 Feb. 2016
Shafiul To determine whether a handle (say h) is that of a block or model, just query its type:
get_param(h,'Type')
For a model, the above query will return block_diagram, while for a block it will return block.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!