Simulink: How to export to workspace all entities attributes?
3 次查看(过去 30 天)
显示 更早的评论
I have assigned 7 different attributes to each entity (mainly time stamps as the entity moves along the process). How can I export to workspace a variable containing a matrix with all the attributes (columns) for each entity (rows) ?
2 个评论
TAB
2018-5-27
Unclear question.
Please explain "entity" and from where are you exporting. Is this question related to Simulink/Toolbox etc ?
回答(1 个)
Krishna Akella
2018-12-4
Hi Matias,
Have you tried using the assignin function? For example, in the event actions of any SimEvents block, try calling:
coder.extrinsic('assignin');
assignin('base', 'k', entity)
Assuming, k is the variable in your workspace that you want to assign the values of the entity to.
- Krishna
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete-Event Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!