octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45,


From: Ken Marek
Subject: [Octave-bug-tracker] [bug #63162] Inaccurate "Events" location in ode45, ode23(s)
Date: Wed, 5 Oct 2022 13:29:19 -0400 (EDT)

Follow-up Comment #1, bug #63162 (project octave):

The solution to this bug involves sending additional arguments to file
ode_event_handler.m so that it can call the interpolation function
runge_kutta_interpolate.m. While I was making these changes, I fixed a couple
other problems related to function parameters being passed around:

* Extra function arguments were being passed around the ode solvers and sent
to the derivative function (fcn), as well as OutputFcn and the Events
function, if either of them existed. The extra arguments feature is
undocumented and does not appear to exist in Matlab, and I believe the user is
able to wrap their functions in anonymous functions to achieve the same result
if desired. I am removing the sending of extra arguments to OutputFcn and
Events, as it seems like poor practice to always send extra fcn arguments to
other functions as well (especially when those functions are not documented to
accept the extra arguments either). I am leaving the extra arguments feature
for fcn at present, since it doesn't really seem to break any other
functionality that way, although I have added a FIXME mark indicating it
should possibly be removed.

* ode_event_handler.m specifies that input y can be either a column vector, or
a cell array with the y values in the first cell, and derivatives in the
second. I could not find any function that calls ode_event_handler and
utilizes the cell input. Interpolation would require handling this input if
given, but since no functions actually use the cell input, I took it out of
ode_event_handler and didn't try to implement it for the interpolation,
either.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63162>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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