フィルターのクリア

How to get only Subsystems in a Simulink Model

27 ビュー (過去 30 日間)
Sultan
Sultan 2016 年 10 月 14 日
コメント済み: Avinash Kumar 2022 年 11 月 9 日
I have a simulink model which has 2 subsystems in it. One subsystem named 'S1' contains another subsystem named 'Subsystem1', so that the hierarchy of the last block 'BL1' is 'model/S1/Subsystem1/BL1'. Is there any command like find_system() etc. that can display only the names of the Subsystems like 'S1' & 'Subsystem1' ?
I have used: find_system('model','Type','Block') but it gives all the names of the Blocks as well as Subsystems too.

採用された回答

Swarooph
Swarooph 2016 年 10 月 14 日
編集済み: Swarooph 2016 年 10 月 14 日
Looks like there is no direct way to do this using find_system. Although there is a workaround. Take a look at this answer.
If you are naming your Subsystems a 'certain' way (say you prefix all your subsystem names with the keyword 'Subsystem' followed by an index number or such), you can use the regexp functionality built into the find_system command. To help with this, take a look at:
  1. This answer
  2. The documentation
  1 件のコメント
Avinash Kumar
Avinash Kumar 2022 年 11 月 9 日
Hello Team,
Is there any way to link subsystems with the requirements(slreq)?
Thanks & Regards,
Avinash.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by