Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Sudipto Saha
Sudipto Saha le 15 Juil 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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.

Réponses (2)

Raj
Raj le 15 Juil 2019
"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 le 15 Juil 2019
Thanks a lot!!

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by