help-octave
[Top][All Lists]
Advanced

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

LSODE questions


From: Douglas Eck
Subject: LSODE questions
Date: Tue, 23 Oct 2001 15:32:18 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010913

Probably for John Eaton, but maybe someone else gets the idea. I know I don't.
These are all specific questions about how lsode is implemented in octave 2.1.34

In /usr/src/octave-2.1.34/src/DLD-FUNCTIONS/lsode.cc
at line 279 I see this:

      Matrix output (nsteps, nstates + 1);
      if (crit_times_set)
        output = ode.integrate (out_times, crit_times);
      else
        output = ode.integrate (out_times);


Q1: Why is output initialized to columns=nstates+1. When I call
ode.integrate(), output always has columns=nstates after
integration.

Q2: More basically, why initialize it at all? Why not just a
"Matrix output;" declaration?

Q3: Is there a way to set the timepoints to compute without
having to initialize a new ode(...)?  I'm using the solver in conjunction
with data acquisition and am computing only a few slices at a time. Each
time I pick up where i left off before. What I'd like to do is this:

initialize solver
while (computing)  {
   set timepoints of solver [tCurrent:.001:tCurrent+k]
   integrate
   grab last value from integration to use as initial value in next integration
   tCurrent+=tCurrent+k;
}


PS this is the first time i've used the solver directly from C++. It's
really fast and very nice to work with! Excellent excellent John.

-D



--
Dr. Douglas Eck, http://www.idsia.ch/~doug
Istituto Dalle Molle di Studi sull'Intelligenza Artificiale (IDSIA)
Neural Networks, Rhythm Perception and Production, Dynamical Systems



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



reply via email to

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