I am trying to control a simulink from a M-file. What I want to do in the M-file is give the simulink model some input, run the simulink model, change one input value at 0.6
You can get the current time of a running simulation with:
get_param('simulink_model_name', 'SimulationTime');
So for instance by checking this value from your M-file during simulation by using
timer(...)
you can detect when the simulation is at 0.6 seconds.