Simulink: How to export to workspace all entities attributes?

3 ビュー (過去 30 日間)
Matias Giardino
Matias Giardino 2018 年 5 月 27 日
回答済み: Krishna Akella 2018 年 12 月 4 日
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
TAB 2018 年 5 月 27 日
Unclear question.
Please explain "entity" and from where are you exporting. Is this question related to Simulink/Toolbox etc ?
Matias Giardino
Matias Giardino 2018 年 5 月 28 日
Hi, I'm using simevents. Entities are created using the entities generator module. Thanks.

サインインしてコメントする。

回答 (1 件)

Krishna Akella
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

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by