How can I stop or pause my simulation at a certain time, get the value of the variables in the simulink model and then continue the simulation?

I am implementing Dynamic programming on my Hybrid vehicle model. I use script file to run the model at consecutive second, namely from 1s(second) to 2s, 2s to 3s, 3s to 4s... The thing is that how can I get the values of some variables, such as the fuel flow rate, velocity of vehicle, in the model at each second? Because I need them to calculate the value of cost function.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 10 Apr 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!