changeset 22596:8d3a2d1af389 stable

fix missing function arguments in call to starting_stepsize * scripts/ode/private/starting_stepsize.m : take additional function arguments as input * scripts/ode/private/integrate_adaptive.m : pass additional arguments to starting_stepsize
author jcorno <jacopo.corno@gmail.com>
date Wed, 05 Oct 2016 17:35:24 +0200
parents b8d525710075
children f812283c4367 5aa8f199e328
files scripts/ode/private/integrate_adaptive.m scripts/ode/private/starting_stepsize.m
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ode/private/integrate_adaptive.m	Thu Oct 06 07:13:24 2016 +0200
+++ b/scripts/ode/private/integrate_adaptive.m	Wed Oct 05 17:35:24 2016 +0200
@@ -76,7 +76,7 @@
   dt = odeget (options, "InitialStep", [], "fast");
   if (isempty (dt))
     dt = starting_stepsize (order, func, t, x, options.AbsTol, options.RelTol,
-                            strcmp (options.NormControl, "on"));
+                            strcmp (options.NormControl, "on"), options.funarguments);
   endif
 
   dir = odeget (options, "direction", [], "fast");
--- a/scripts/ode/private/starting_stepsize.m	Thu Oct 06 07:13:24 2016 +0200
+++ b/scripts/ode/private/starting_stepsize.m	Wed Oct 05 17:35:24 2016 +0200
@@ -36,13 +36,13 @@
 ## @seealso{odepkg}
 
 function h = starting_stepsize (order, func, t0, x0,
-                                AbsTol, RelTol, normcontrol)
+                                AbsTol, RelTol, normcontrol, args)
 
   ## compute norm of initial conditions
   d0 = AbsRel_Norm (x0, x0, AbsTol, RelTol, normcontrol);
 
   ## compute norm of the function evaluated at initial conditions
-  y = func (t0, x0);
+  y = func (t0, x0, args{:});
   if (iscell (y))
     y = y{1};
   endif
@@ -58,7 +58,7 @@
   x1 = x0 + h0 * y;
 
   ## approximate the derivative norm
-  yh = func (t0+h0, x1);
+  yh = func (t0+h0, x1, args{:});
   if (iscell (yh))
     yh = yh{1};
   endif