My model has an InitFcn callback that performs an action. I wish this action to be different based on whether the InitFcn was called from an update diagram (CTRL-D), or from model simulation as it is normally called before the StartFcn callback.
MATLAB: How to tell if the InitFcn callback is being called from a model “Play” or an “Update Diagram” command or button-press in Simulink 7.4 (R2009b)
callbackinitfcninitializingsimulinkupdate
Best Answer