[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 19:12:59 +0100 |
On 21.11.2014, at 14:02, rocketsound <address@hidden> wrote:
>
> I'm using Octave version 3.8.2 from http://mxeoctave.osuv.de, control 2.6.5
> and the experimental GUI.
>
> You can find my full script here: http://pastebin.com/Nu9M7Zmj
>
> Please note that this is a script I'm using to solve an exercise for
> university so it's quite messy, sorry for that. The interessing lines are
> lines 6 and 7. Changing the multiplier from 1 to 2, 3 or anything higher
> will break the script. The next interesting line is line 95. Here I'm
> calling lsim(). When you try to debug the code you will notice that the size
> for both parameters u and t for lsim() are 51x1 in case the multiplier is 1
> and 101x1 in case the multiplier is 2. But for a multiplier of 2 (or
> anything greater) I get the error message from above ("u must be 100 rows").
If you replace line 95
[y_out, t_out, x_out] = lsim(discreteSystemZOH, y_val(3:3:end, 1), t_vec(:,1),
x_0);
by
[y_out, t_out, x_out] = lsim(discreteSystemZOH, y_val(3:3:end, 1), [], x_0);
do you get the results you expect?
Lukas
- 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 <=
- 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