When we use following commands inside the callback of Assertion block and simulate the model, an error is generated which mentions that the variable SIMOUT cannot be found.
set_param(bdroot,'SimulationCommand','pause'); disp('Simulation paused.');evalin('base','plot(simout.signals.values)'); disp('Data plotted.');set_param(bdroot,'SimulationCommand','continue')
However using the following command from MATLAB Command Prompt works fine:
plot(simout.signals.values)
Best Answer