[Top][All Lists]

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

Re: Speed of lsim

From: Geraint Paul Bevan
Subject: Re: Speed of lsim
Date: Tue, 29 Jul 2003 14:38:33 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

SToyama wrote:
Hi. I am a beginner of Octave, and I need some help to accelerate
As I want to simulate the response of a linear time-invariant state
equation to the arbitrary input signal, I tried to use "lsim". But I feel it's
too slow.
For example, it took about a minute to solve the step response of a
simple 1st order lag system, 1/(1+s). My Octave is version 2.1.36, my PC has Pentium-III 1.2GHz and 256MB-RAM and OS is Windows XP Pro.
I'm waiting for your good advice.

That is very slow, using octave 2.1.50 on an i686 running Debian/Linux it takes less than a second:

octave:1> sys = tf2sys(1, [1,1]);
octave:2> t = linspace(0,10,1001)';
octave:3> u = ones(1001,1);
octave:4> tic; lsim(sys,u,t); toc
ans = 0.33443

Are you using a pre-packaged version of octave or did you compile it yourself?

Geraint Bevan
Department of Mechanical Engineering
University of Glasgow
Tel: +44 (0)141 330 5917

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]