How can I warn users that a simulation was run using the 'sim' function vs the GUI play button?
Show older comments
From within a StopFcn callback, I need to determine if the simulation was run using the 'sim' function vs using the GUI play button.
This is because the simulation outputs are not available in the callback for the command-line simulations and I have post-processing script running in the StopFcn callback.
How can I robustly determine whether the 'sim' function was used to run the simulation?
Because I want to detect when someone calls the 'sim' function, and throw a warning or an error telling them to run using the GUI play button.
Accepted Answer
More Answers (0)
Categories
Find more on Model, Block, and Port Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!