There are few possible ways to your question,
- You can call a MATLAB script from Simulink by using any of the callbacks as per your workflow and then use it in the program. The callbacks function allows you to add callbacks at different part of the simulation. To know more about modelling callback parameters, refer to the MathWorks documentation here.
- Another option to call a Matlab script is to use the MATLAB function block in Simulink. To look for an example on how to use MATLAB function block click here.
Further to call the script during specific simulation time, you can use the clock block to get the simulation time (Calculate the percent of the simulation time by using the total simulation time and the value from the clock block) and have any of the control-flow logic block to check your condition.