Borrar filtros
Borrar filtros

Simulink: How to export to workspace all entities attributes?

1 visualización (últimos 30 días)
Matias Giardino
Matias Giardino el 27 de Mayo de 2018
Respondida: Krishna Akella el 4 de Dic. de 2018
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 comentarios
TAB
TAB el 27 de Mayo de 2018
Unclear question.
Please explain "entity" and from where are you exporting. Is this question related to Simulink/Toolbox etc ?
Matias Giardino
Matias Giardino el 28 de Mayo de 2018
Hi, I'm using simevents. Entities are created using the entities generator module. Thanks.

Iniciar sesión para comentar.

Respuestas (1)

Krishna Akella
Krishna Akella el 4 de Dic. de 2018
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

Categorías

Más información sobre Discrete-Event Simulation en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by