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

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

[Octave-bug-tracker] [bug #49890] error if event function stops ode45


From: Rik
Subject: [Octave-bug-tracker] [bug #49890] error if event function stops ode45
Date: Fri, 23 Dec 2016 06:03:25 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #49890 (project octave):

                  Status:                    None => Works For Me           

    _______________________________________________________

Follow-up Comment #3:

Without an example from the original reporter, we can close this bug.  It
works for me with a trivial event function


function [value, isterminal, direction] = evfcn (t, y)

  isterminal = 1;
  direction = 0;

  if (t < 1)
    value = 1;
  else
    value = 0;
  endif

end


and the call


opts = odeset ('Events', @evfcn);
[t,y,te,ye,ie] = ode45 (@(t,y) 2, [0, 2], 1, opts)
warning: Solver was stopped by a call of 'break' in the main iteration loop at
time t = 1.146792 before the endpoint at tend = 2.000000 was reached.  This
may happen because the @odeplot function returned 'true' or the @event
function returned 'true'.
warning: called from
    integrate_adaptive at line 319 column 7
    ode45 at line 227 column 12
t =

   0.00000
   0.14679
   0.34679
   0.54679
   0.74679
   0.94679
   1.14679

y =

   1.0000
   1.2936
   1.6936
   2.0936
   2.4936
   2.8936
   3.2936

te =  1.1468
ye =  3.2936
ie =  1




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49890>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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