[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lsim() trims time vector in an odd fashion
From: |
Lukas Reichlin |
Subject: |
Re: lsim() trims time vector in an odd fashion |
Date: |
Fri, 21 Nov 2014 05:07:05 +0100 |
> On 20.11.2014, at 23:30, rocketsound <address@hidden> wrote:
>
> I stumpled upon an odd behavior by lsim and I couldn't really figure out what
> I'm doing wrong. So let me give an quite specific problem description and
> maybe we can point out the problem.
>
> I've calculated a discrete input signal u and have an appropriate time
> vector t, both of the same length. If I pass an u and t vector both of
> length 51 to lsim everything works just fine (in my special case it's the
> time from 0 to 5s with a step size of 0.1 s). But if I set the length of u
> and t to 101 I get an error telling me "lsim: input vector u must have 100
> rows" (in this case it's the time from 0 to 10s with a step size of 0.1 s).
> I looked up the specific row in lsim where the error happens and noticed
> that the time vector t got trimmed to a length of 100 entries and that the
> last entry was missing (in my case the 10s itself). In both cases I'm
> calling lsim with an initial condition, i.e. I'm using [y, t, x] = lsim
> (sys, u, t, x0). Also, the system I'm simulating is discrete if this
> matters.
>
> I don't understand this behavior of lsim(), am I missing something?
Could you please provide the version numbers of both your Octave and control
package installations as well as your example script?
Lukas
- lsim() trims time vector in an odd fashion, rocketsound, 2014/11/20
- Re: lsim() trims time vector in an odd fashion,
Lukas Reichlin <=
- Re: lsim() trims time vector in an odd fashion, rocketsound, 2014/11/21
- Re: lsim() trims time vector in an odd fashion, Lukas Reichlin, 2014/11/21
- Re: lsim() trims time vector in an odd fashion, rocketsound, 2014/11/23
- Re: lsim() trims time vector in an odd fashion, rocketsound, 2014/11/26
- Re: lsim() trims time vector in an odd fashion, Lukas Reichlin, 2014/11/26
- Re: lsim() trims time vector in an odd fashion, Lukas Reichlin, 2014/11/30
- Re: lsim() trims time vector in an odd fashion, rocketsound, 2014/11/30