The To Workspace block writes event-based signals to the MATLAB® workspace when the simulation stops or pauses. One way to pause a running simulation is to select Simulation > Pause.
The example shows one way to write the times and values of signals to the MATLAB workspace. In this case, the signal is the n output from an Entity Queue block, which indicates how many entities the queue holds.
You can use different time formats in the To Workspace block to display the data.
To record entities and their attributes passing along an entity line, consider connecting a To Workspace block to that entity line.
You can log data from your SimEvents® model using Simulink®. For more information, see Save Runtime Data from Simulation.