"Phil Goddard" <
ph...@goddardconsulting.ca> wrote in message <klk8ch$fud$
1...@newscl01ah.mathworks.com>...
> MATLAB's "sim" function, i.e. the usual way to call a Simulink model from MATLAB, is blocking, i.e. it waits until the model finishes executing before the next line of code gets exectuted.
>
> Although I note that you seem to be be using external mode, and I'm not sure of sim's behaviour in that case.
>
> Phil.
Phil,
This is what I really needed! Thank you very much!
To start the simulink I was using:
set_param('model','SimulationCommand','Start')
So, it runs the simulink and at the same time runs the code.
I have changed for your suggestion and, now, the code waits for the simulink simulation.
Once again, thank you!
Hugo