I have a Simulink model that I would like to run using Real-Time Windows Target. I want to run this model many times consecutively from a MATLAB file. The problem is that, after I start the simulation once, I need the MATLAB file to wait until the simulation is finished before it moves on. It does not do this automatically, since the simulation is started in external mode with the command:
set_param(gcs,'SimulationCommand','start')
If I use the PAUSE function, both the MATLAB file and the Simulink simulation pause. The functionality I require is for the MATLAB file to pause while the simulation continues to run.
Best Answer