Can I find where a Simulink.Signal object is stored based on a Data Store Read/Write in the model?
4 次查看(过去 30 天)
显示 更早的评论
Simulink.Signal objects can be stored in the base workspace, model workspace, and/or a data dictionary. If I have a Data Store Read or Write that refers to a Simulink.Signal object (i.e., a "global" data store), is it possible to determine which one it is using? Can I do this programmatically? Using the get_param function on the data store read/write does not show any useful parameters that could associate a data store to its definition.
0 个评论
采纳的回答
TAB
2018-9-28
编辑:TAB
2018-9-28
If Simulink.Signal object name is "x"
>> varInfo = Simulink.findVars('MyModel','Name','x')
varInfo =
VariableUsage with properties:
Name: 'x'
Source: 'base workspace'
SourceType: 'base workspace'
Users: {[1x26 char]}
3 个评论
TAB
2018-10-1
get_param('MyModel/Data Store Memory', 'OutDataTypeStr') get_param('MyModel/Data Store Memory', 'Dimensions')
更多回答(0 个)
另请参阅
类别
在 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!