MATLAB: Time axes (horizontal axes) range of Scope

rangescopetime

I set simulation time on 5000s but after stopping simulation, Scope displays from 4995s to 5000s and not from 0 to 5000. what's the problem?

Best Answer

By default, the Scope block has a limit of 5000 data points. Change the Scope parameters in the "Data History" tab to allow more data points.
However, if your simulation from 4995s to 5000s takes 5000 data points, you may have too many data points. You don't need that many data points to show in the scope. You won't be able to tell it anyway. Change the sampling decimation from 1 to 10 or even 100, 1000 to reduce the data pints but still give you a big picture of the curve.