フィルターのクリア

bdroot causes problems in MATLAB 2017b

5 ビュー (過去 30 日間)
Vamsinag Gunti
Vamsinag Gunti 2018 年 11 月 6 日
回答済み: Fangjun Jiang 2018 年 11 月 7 日
Hi,
I have a script that makes use of bdroot multiple times to fetch the top level model. The script works absolutely fine in MATLAB 2015b. We recently migrated our project to MATLAB 2017b. The bdroot command fetchs me the top level model only the first time and there after outputs 'simulink'. Is this a bug in MATLAB 2017b or is there some new feature in this version that changes the bdroot in the background.
Thanks in advance.
Best regards, Vamsi

採用された回答

Fangjun Jiang
Fangjun Jiang 2018 年 11 月 7 日
Something may have changed from R2015b to R2017b but I would say that your usage of bdroot() for this purpose is not robust. "Simulink" is the opened Simulink library file name. bdroot without input argument could return any root level model name depending on which one is activated.
Use bdroot(block) or bdroot(BlockHandle) to return the root level model name of the selected block. Or, use ModelName=bdroot once when it is certain and pass the ModelName to other places.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by