I have a Simulink model and a MATLAB script. I am collecting data from the Simulink model into the MATLAB script, meaning that I need to run the Simulink model iteration by iteration, because I need the data from my Simulink model in my MATLAB script. I have googled, and found one answer saying to write the following in my script:
sim('name_of_model', [tStart tFinal]);
but this only runs the model from 0 to x seconds, and not iteration by iteration. Can anyone please help me?
Best Answer