help-octave
[Top][All Lists]
Advanced

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

Re: lsode problem with simple ODE system.


From: c.
Subject: Re: lsode problem with simple ODE system.
Date: Sun, 1 Sep 2013 11:37:58 +0200

On 31 Aug 2013, at 21:05, Paolo Ferraresi <address@hidden> wrote:

> Hello, I have a problem with "lsode".
> The following script, is solved in seconds with a simple fixed step
> Runge-Kutta (23 order) while "lsode" seems not able to integrate this ode
> system.
> Even if you change the parameters ("stiff", "adams", working with tolerances
> and other parameters). With "stiff" i got an error. With "adams" it takes an
> infinite time ...
> 
> Who can help me. I would prefer to use the native "lsode" rather than rk.

As pointed out by Olaf, with fixed time step you always get some solution in a 
fixed amount of time, 
while time step selection may be complicated for a problem like yours which has 
3 components of different 
scales and a highly oscillating solution.

The attached modification of your script works reasonably well for me, notice 
the different 
absolute tolerances for the different components.

Furthermore notice that there is non need to use global variables, you can use 
anonymous functions to bind input parameters 
as is also shown in the attachment.

HTH,
x.

Attachment: temp.m
Description: Binary data


reply via email to

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