I have a simulink model with a Call-Back that, amongst other things, asks the user which case they want to run and reads that case's data from a spreadsheet. To do the user is asked via a simple Matlab dialogue box to enter an integer.
However, I now need too build a batch mode, were Matlab will be in charge and run multiple simulations, specifying what the integer should be without the need for an dialogue box.
Q: How can I get Simulink and it's Matlab code in callbacks to know whether it has been run by hitting the green run button or by the "sim" command or similar in Simulink
Given that the model will sometimes break, it would be nice not to rely on the external Matlab code doing the running to have to positively remember to cancel the batch mode.
Or maybe one of the more mysterious callbacks might help me? Thanks