How to distinguish Subsystem and Chart by comparing their block properties in MATLAB 2017b?
1 次查看(过去 30 天)
显示 更早的评论
- Firstly, due to the different block properties 'LibraryVersion' in MATLAB 2016a, I can distinguish them.
Subsystem:
get_param(gcbh,'LibraryVersion')
ans =
0×0 empty
Chart:
get_param(gcbh,'LibraryVersion')
ans =
'1.267'
- Secondly, the chart property 'LibraryVersion' is set to null in MATLAB 2017b. Therefore, most of their properties are the same.
The question is how can I find the difference between Subsystem and Chart by using m scripts .
0 个评论
回答(1 个)
Arunkumar M
2018-11-9
You can use type property of the objects in simulink model. For subsystem, it will be Type: 'block' and for stateflow chart, it will be Type: 'Stateflow'
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!