Simulink 中如何通过脚本列出模型中的所有模块名字?

27 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 14 Nov 2019
Simulink 中如何通过脚本列出模型中的所有模块名字?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Nov 2019
参考代码是:
>> load_system('model_name')
>> bl = getfullname(Simulink.findBlocks('model_name'))
需要注意的是,这段代码的结果包括了:
封装内的模块;
被注释掉的模块;
变体子系统中的模块。

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!