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 CenterFile Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by