Simulink 中如何通过脚本列出模型中的所有模块名字?
27 views (last 30 days)
Show older comments
MathWorks Support Team
on 14 Nov 2019
Answered: MathWorks Support Team
on 14 Nov 2019
Simulink 中如何通过脚本列出模型中的所有模块名字?
Accepted Answer
MathWorks Support Team
on 15 Nov 2019
参考代码是:
>> load_system('model_name')
>> bl = getfullname(Simulink.findBlocks('model_name'))
需要注意的是,这段代码的结果包括了:
封装内的模块;
被注释掉的模块;
变体子系统中的模块。
0 Comments
More Answers (0)
See Also
Categories
Find more on ASK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!