Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Define a matrix in simulink whose elements are evaluated at some other functions in the same model

1 回表示 (過去 30 日間)
Sudipto Saha
Sudipto Saha 2019 年 7 月 15 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I need to define a matrix whose elements are to be obtained form another simulink function. I tried using simout to workspace but the problem is that the value is obtained only when the simulation is stopped or paused but I need to update the matrix during simualtion.

回答 (2 件)

Raj
Raj 2019 年 7 月 15 日
"to workspace" block updates that workspace after end of simulation. Instead you can use the data store memory block. Use a data store write block to write the matrix into memory and then data store read to read the value wherever required in the model. Set the priorities correctly to avoid 'read before write' condition.

stella T
stella T 2019 年 7 月 15 日
Thanks a lot!!

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by