[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lsim() trims time vector in an odd fashion
From: |
rocketsound |
Subject: |
Re: lsim() trims time vector in an odd fashion |
Date: |
Sun, 30 Nov 2014 11:49:33 -0800 (PST) |
Thank you for your reply. I'm really trying to get behind this issue, but I
still don't get it :(. Of course your solution works and of course my way
creating t_vec is cumbersome but I'm still trying to understand how the
problem is caused by the loop beginning at line 10.
When I debug into lsim() I see that dt = 0.1, tinitial = 0, and tfinal = 10
in the workspace pane of the GUI and that seems pretty fine. Now, if I enter
reshape(tinitial : dt : tfinal, [], 1); on the command prompt I'll get a
vector with 101 entries. But if I debug lsim() I get, against my
expectations, a vector with only 100 entries but the parameters to the
function are the same! I noticed that when I add t_vec(end) =
int32(t_vec(end)); after the for loop (beginning at line 10) the code works.
I guess this issue isn't related to lsim() anymore but I would be very
thankful if you could shed some light on the matter.
--
View this message in context:
http://octave.1599824.n4.nabble.com/lsim-trims-time-vector-in-an-odd-fashion-tp4667401p4667587.html
Sent from the Octave - General mailing list archive at Nabble.com.
- lsim() trims time vector in an odd fashion, rocketsound, 2014/11/20
- Re: lsim() trims time vector in an odd fashion, Lukas Reichlin, 2014/11/20
- 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 <=