How can I see the graph starting 0.02s in the scope every time?

12 visualizzazioni (ultimi 30 giorni)
In my Simulink simulation, I want to see the graph from 0.02s to 0.08s. I set the simulation time to 0.08s. So, now I can see my graph from 0s to 0.08s. So, now how can I see the graph starting 0.02s instead of 0s in the scope everytime?
I'm using Matlab 2019b
TIA

Risposte (1)

Aashray
Aashray il 29 Ago 2025 alle 9:15
I understand you want the Simulink Scope to always display only the interval from 0.02 s to 0.08 s, instead of starting at 0 s every run.
In MATLAB R2019b, the Scope block does not support fixing a custom start time. You can set the Time span (for example 0.06 s), but the Scope will always begin at 0 s. The only options are to manually adjust the axes after the simulation or log the signal and plot the required interval in MATLAB.
As a workaround, in newer releases (I checked in MATLAB R2024b) the Scope includes a Time offset property. This allows you to shift the visible window automatically.
For your case:
  1. Open the Scope and go to View, then Configuration Properties, then Time.
  2. Set Time span = 0.06 (the window length).
  3. Set Time offset = 0.02 (the desired start).
Now the Scope will always display the window [0.02, 0.08] every time you run the simulation, without any manual zooming.
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by