help-octave
[Top][All Lists]
Advanced

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

Re: Pulse function in a LSODE system


From: Olaf Till
Subject: Re: Pulse function in a LSODE system
Date: Mon, 9 Nov 2009 08:14:58 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Nov 06, 2009 at 01:08:44PM +0100, Emanuele T. wrote:
> Hi, i'd like to introduce in my differential equations a parameter that
> assumes specific value (a function of one or more solution of my sistem)
> every 5 time step. I attach you my code. I have no clearfull ideas on time
> step: if I print my variable "t" it returns me some decimal value.
> Thanks in advance
> 
> E.T.

Hi Emanuele,

lsode uses adaptive time stepping (I believe there was a similar
thread just a few days ago), so you can't rely on a specific time step
(you give lsode a vector of times, but the solution values for these
will be interpolated, so you do not determine the time step).

You can, however, change the parameter at a certain time (not a
certain time step). Be warned, this will cause methods with adaptive
time stepping to take a long time at each parameter change, while
methods with fixed time stepping will possibly yield bad solutions. It
may be better to change the parameter in a continuous way, e.g. with
some sigmoid function of time.

Regards, Olaf


reply via email to

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