[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 |

Hi
I am using the LSODE solver for my research and now need to do the
following.
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
endif
xdot(1) = ...
...
xdot(n) = ...
endfunction
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.
Thanks
--
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 http://bioinformatics.cat.nyu.edu
"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: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**Help with ODE solver**,
*Marco Antoniotti* **<=**
**Re: Help with ODE solver**, *Michael Hanke*, `2002/09/12`
**Re: Help with ODE solver**, *Douglas Eck*, `2002/09/12`
**Re: Help with ODE solver**, *John W. Eaton*, `2002/09/12`
**Re: Help with ODE solver**, *Marco Antoniotti*, `2002/09/12`
*Message not available***Re: Help with ODE solver**, *John W. Eaton*, `2002/09/12`
**Re: Help with ODE solver**, *Marco Antoniotti*, `2002/09/12`
**Re: Help with ODE solver**, *John W. Eaton*, `2002/09/12`
**Re: Help with ODE solver**, *Marco Antoniotti*, `2002/09/12`