help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lsim() trims time vector in an odd fashion


From: rocketsound
Subject: lsim() trims time vector in an odd fashion
Date: Thu, 20 Nov 2014 14:30:56 -0800 (PST)

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?



--
View this message in context: 
http://octave.1599824.n4.nabble.com/lsim-trims-time-vector-in-an-odd-fashion-tp4667401.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]