find_system返回的对象不是simulink中的子系统吗? [英] find_system returns objects that are not subsystems in simulink?
问题描述
当我使用find_system(gcs,'BlockType','SubSystem')
时,它返回的不是子系统(AFAIK)
When I use find_system(gcs,'BlockType','SubSystem')
it returns things that are not subsystems (AFAIK)
在我的情况下,称为
subsys L1 -x
subsys L1 -x
和
SubsysX L2-z
SubsysX L2 - z
是子系统,但名称仅用于调试目的,因此我无法使用名称进行匹配.
are subsystems, but the names are just for debugging purpose, so I can't use the names to match.
为什么出现[1x51 char]
和Sine
和RealisesUID
?
我只希望子系统显示在模型浏览器"树中.
I only want the subsystems showing up in the Model Browser tree.
'test_simulinkmodel/RealisesUID'
'test_simulinkmodel/subsys L1 - 1'
[1x51 char]
'test_simulinkmodel/subsys L1 - 1/Sine'
'test_simulinkmodel/subsys L1 - 1/Subsys1 L2 - 1'
[1x71 char]
[1x68 char]
'test_simulinkmodel/subsys L1 - 2'
[1x51 char]
'test_simulinkmodel/subsys L1 - 2/Sine'
'test_simulinkmodel/subsys L1 - 2/Subsys2 L2 - 1'
[1x71 char]
[1x68 char]
'test_simulinkmodel/subsys L1 - 3'
[1x51 char]
'test_simulinkmodel/subsys L1 - 3/Sine'
'test_simulinkmodel/subsys L1 - 3/Subsys3 L2 - 1'
[1x71 char]
[1x68 char]
如果我选择包括库链接并包括具有掩码参数的系统,则它们将显示在模型浏览器中.但是,find_system的默认值为"FollowLinks""off",并且"LookUnderMasks"没有说.但是,即使我提供了显式关闭且不提供任何内容,它们仍然会返回相同的结果.
They show up in the model browswer if i select include library links and include systems with mask parameters. However, the default of find_system is 'FollowLinks' 'off' and 'LookUnderMasks' doesn't say. However, even if i provide explicit off and none, they still return the same result.
推荐答案
您可以将LinkStatus参数添加到find_system,以仅查找您自己的子系统,而不查找库中的子系统. find_system(gcs,'BlockType','SubSystem','LinkStatus','none')
.同样,您也可以添加蒙版"和开"或关"值,以根据该块上是否带有蒙版进行过滤.
You can add LinkStatus parameter to find_system to look for only your own sub-systems and not the ones from libraries. find_system(gcs,'BlockType','SubSystem','LinkStatus','none')
. The same way you can also add 'Mask' with 'on' or 'off' values to filter based on whether the block has a mask on it.
正弦"是您自己的库中的一个子系统吗?如果您搜索"SubSystem"的"BlockType",则不会显示Simulink库中的正弦波块.
Is "Sine" a sub-system from your own library? Sine wave block from Simulink library would not show up if you search for 'BlockType' of 'SubSystem'.
这篇关于find_system返回的对象不是simulink中的子系统吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!