How to graph an entire simulink scope plot without the scope plot slowly ticking through the simulation.

9 views (last 30 days)
Mark Jenkin
Mark Jenkin on 3 Dec 2021
Answered: Joel Van Sickel on 22 Dec 2021
I am attempting to model a battery discharging with constant current. I run the simulaton by pressing the continue button in simulink. Matlab is able to quickly compile my block diagram with the battery and the controlled current source, however it then begins ticking through the compiled simulation. When I double click the scope block for the state of charge (SOC) it produces a live plot that is slowly plotting the discharge of my battery. Since my simulation is for 360s it takes around a 360s time period to get a whole plot of SOC. I would like to know how to get the simulink scope plot without having to wait for the simulation to run. I have seen videos on youtube of people compiling code and the simulation does not run, they are then able to click on scope and it produces an entire plot instantly. How do I do this?

Answers (1)

Joel Van Sickel
Joel Van Sickel on 22 Dec 2021
Hello Mark,
there is no way to get a plot without running the simulation as without the simulation, there is no data. You are probably seeing someone open a scope showing data from a previous run or their simulaiton just completed very quickly such that you couldn't see that it was run. Once you start a new run, the scpoe gets cleared, but it is still there before you click the run button if a simulaiton was run previously.




Community Treasure Hunt

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

Start Hunting!

Translated by