diff scripts/ode/ode15s.m @ 29296:7bf91e98bfc6

__ode15__(): Consider the correct number of input arguments in the event callback (bug #59477). * ode15i.m: Provide three input arguments (t, y, yp) in the event callback. * ode15s.m: Provide two input arguments (t, y) in the event callback. * __ode15__.cc: Provide the number of input arguments in the event callback.
author Markus Meisinger <chloros2@gmx.de>
date Mon, 11 Jan 2021 20:11:45 +0100
parents d25cd81b0577
children 7854d5752dd2
line wrap: on
line diff
--- a/scripts/ode/ode15s.m	Thu Jan 14 01:15:45 2021 -0500
+++ b/scripts/ode/ode15s.m	Mon Jan 11 20:11:45 2021 +0100
@@ -312,11 +312,12 @@
 
   yp0 = options.InitialSlope;
 
+  ## 2 arguments in the event callback of ode15s
   [t, y, te, ye, ie] = __ode15__ (@ (t, y, yp) wrap (t, y, yp, options.Mass,
                                                      options.havetimedep,
                                                      options.havestatedep,
                                                      fun),
-                                  trange, y0, yp0, options);
+                                  trange, y0, yp0, options, 2);
 
   if (nargout == 2)
     varargout{1} = t;
@@ -433,7 +434,7 @@
 %!  refrob = [100, 0.617234887614937, 0.000006153591397, 0.382758958793666];
 %!endfunction
 %!
-%!function [val, isterminal, direction] = feve (t, y, ~)
+%!function [val, isterminal, direction] = feve (t, y)
 %!  isterminal = [0, 1];
 %!  if (t < 1e1)
 %!    val = [-1, -2];