check whether a Simulink handle is a block or model programmatically

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

 채택된 답변

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개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

제품

태그

질문:

2016년 2월 3일

답변:

2016년 2월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by