Is there a way to detect embedded matlab function inside a subsystem in a complex simulink model?
显示 更早的评论
I couldn't run a simulink model on a cluster due to presence of a embedded matlab function in one of the subsystems . Is there a way i can detect and locate the embedded matlab function without going through each of the subsystem as i have close to 1000+ subsystems.
回答(1 个)
Fangjun Jiang
2016-2-15
In Command Window, run this command
Blocks=find_system(YourRootLevelModel,'FollowLinks','On','LookUnderMasks','All','MaskDescription','Embedded MATLAB block');
char(Blocks)
In Simulink, you can do it interactively, Select menu Edit->Find... then Select the Advanced tab
3 个评论
monsieurLu
2016-4-20
I am on R2013a and it seems that the Embedded matlab block aren't even masked subsystem. Their 'mask' parameter is 'off' and 'maskdescription' is empty.
Do you know an other parameter abble to differenciate "Embedded Matlab block" form other subsystem ?
Fangjun Jiang
2016-4-21
I don't have R2013a installed. I checked R2014b. It is called "MATLAB function" by default. It is not a masked subsystem.
To find the "MATLAB function" block, you need to use the Stateflow API as it is a Stateflow object. Please refer to this answer.
monsieurLu
2016-4-22
Thanks for the useful answer.
类别
在 帮助中心 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!