My simulation is writing data in Matlab from Simulink, then I automatically paused it and do some computations on Matlab. After that the Simulink is continued automatically and I want to read the results of the Matlabs computations on Simulink.
The problem is that the box "From Workspace" doesn't update the values while the simulation is running or even paused. Is there a solution for updating the values or no?
Based on the description on To Workspace this should be possible (updated), see below:
The To Workspace block inputs a signal and writes the signal data to the MATLAB® workspace. During the simulation, the block writes data to an internal buffer. When the simulation is completed orpaused , that data is written to the workspace. The block icon shows the name of the array to which the data is written.
This can be done using SET_PARAM command. In Simulink only Tunable Parameters can be changed with SET_PARAM at runtime. You can have a look at the below blog for the description: