Storing entities attributes in a Data Store Table

1 回表示 (過去 30 日間)
Tiago Almeida
Tiago Almeida 2016 年 3 月 28 日
回答済み: Devdatt Lad 2016 年 3 月 29 日
Greetings,
I'm trying to fill the first column of a Data Store Table with a list of attributes from a Get Attribute Block (previously saved in a Set Attribute Block).
The intended result is as the following picture presents in blue. I already tried to output the ID into a Data Store Write but the port dimensions are different (GetAttribute is 1x1 while Data Write is 1x4).
Can i do it with a couple of blocks or should i find a way with a MATLAB function block?
Any help is appreciated. Thanks in advance.

回答 (1 件)

Devdatt Lad
Devdatt Lad 2016 年 3 月 29 日
You can try using the Assignment block in Simulink Math library to assign the value to a specific element of your Data Store Memory matrix. Put both the Assignment and the Data Store Write blocks in an Atomic Subsystem so that they will run on events.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by