Why do I receive an "Undefined function or variable" for "simout" inside an Assertion block callback in Simulink 8.5 (R2015a)?
Show older comments
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)
Accepted Answer
More Answers (0)
Categories
Find more on Model, Block, and Port Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!