[Top][All Lists]

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

Help with ODE solver

From: Marco Antoniotti
Subject: Help with ODE solver
Date: Wed, 11 Sep 2002 16:09:37 -0400


I am using the LSODE solver for my research and now need to do the

At a time t_i, I need to change the value of one (or more) of the
variable(s) involved.

I think I understand I have two avenues to follow to achieve this
goal, but, given my inexperience with Octave (and/or Matlab) I don't
know which is the best one.

1 - I could insert a specific test in the derivative function

  function xdot = f(x, t)
    xdot = zeros(rows(x), 1);

    if (t == t_i)
       ## set x(k) to M

    xdot(1) = ...
    xdot(n) = ...


2 - I could break down the integration into intervals and set the
    variable value between integrations.

I'd like some comments about what would be the "best" (for an
approrpiate definition of "best") way to achieve this goal.


Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
715 Broadway 10th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA       
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.

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]