How can I get the output and input names of all my subsystem blocks in my simulink model?
92 ビュー (過去 30 日間)
古いコメントを表示
I used Simscape to build a circuit that I divided into different subsystems. Is it possible to read in the inputs and outputs of these subsystem blocks and the name of the subsystem block with a Matlab function like find_system?
0 件のコメント
採用された回答
Christopher Wallace
2018 年 7 月 24 日
Yes. What have you tried so far?
Something like this should work.
rootHdl = get_param(bdroot, 'Handle');
sysIns = find_system(rootHdl, 'BlockType', 'Inport');
sysOuts = find_system(rootHdl, 'BlockType', 'Outport');
inportNames = get_param(sysIns, 'Name');
outportNames = get_param(sysOuts , 'Name');
1 件のコメント
Alikouider
2021 年 12 月 7 日
Hello,
I would like to Know how I could get the input port of the first level of my system only?
Thanks in advance
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Subsystems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!