CroCo
CroCo

Reputation: 5741

Why does Simulink start from a nonzero value?

I'm doing some simulations for control systems. I've noticed that the start time is not zero, even though in the parameters of simulation, the start time is set to zero. For example, in the following diagram,

enter image description here

enter image description here

The output of the signal is

enter image description here

with the following settings

enter image description here

I've imported data and the start values are

a =
    1.0010    1.0010
    1.0020    1.0020
    1.0030    1.0030
    1.0040    1.0040

How to reset the start time so that the simulation should start from zero not one?

Upvotes: 3

Views: 3129

Answers (2)

NKN
NKN

Reputation: 6424

Make sure you check the following setting:

enter image description here

The tick that @thewaywewalk mentioned is checked for the previous versions (below R2015. It is by default unchecked in R2016.

enter image description here

Upvotes: 4

Robert Seifert
Robert Seifert

Reputation: 25232

This answer applies for Matlab R2015a and below. For newer versions refer to the answer of NKN.


Simulink tricks you! The answer is quite simple:

Your output as well as simulation time actually starts from 0! Just the scope doesn't.

The reason is the default scope property "Limit data points to last 5000 ", which is always checked for new scopes (except in the newest Matlab versions). So uncheck that box, and everything will be fine.

enter image description here

Upvotes: 5

Related Questions