[Top][All Lists]

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

lsim problem

From: Gerrit
Subject: lsim problem
Date: Wed, 20 Oct 2004 22:09:04 +0200
User-agent: Mutt/1.4.1i


I am having a homework assignment which involves lsim. The homework
assignment was designed for Matlab, but i'm trying to solve it with
Octave. I already converted some necessary things (tf -> sys, freqresp
-> __freqresp__ (why?)), but I'm stuck with lsim. My input is currently

G = tf2sys([1], [2, 2, 1]);
t = 0:.01:20;
u = exp(-t) + sin(t*2)/5;
[y, tt] = lsim(G, u, t); % literally taken from homework assignment
plot(t, u, 'r', tt, y, 'b');

The fourth line gives the following error message:

error: lsim: There should be an input value (row) for each time instant
error: evaluating if command near line 59, column 3
error: called from `lsim' in file 
error: near line 12 of file `/srv/www/studie/s_en_t/opg23.m'

I don't understand this error message. The dimensions of u and t are
obviously the same: doesn't that mean there is an input value for each
time instant? How do I convert u and t so that it will work as it
probably is supossed to work with Matlab?

(sorry, I can't test it with Matlab: i don't own Matlab. The reason I'm
using Octave is a money reason)

Gerrit Holl.

Weather in Twenthe, Netherlands 20/10 21:25:
        16.0°C   wind 2.7 m/s SSE (57 m above NAP)
Ervaringen met het Syndroom van Asperger:
Socialistische Partij:

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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