MATLAB: Pause simulation and do calculation

MATLABpausesimulationsimulink

Hi,
I have a unique need to pause simulation at known time points and do calculation with the obtained workspace data to that point, plot it, then resume simulation. What is the best way of setting it up with a subsystem and its InitFcn, or other callback functions?
Thanks
Related Question