diff scripts/ode/ode45.m @ 22935:c9344df03da5

Allow case-insensitive option argument 'on' to ode solvers (bug #49918). * ode15i.m, ode15s.m: Change strcmp to strcmpi for test of odeopts 'Stats. * ode23.m, ode45.m: Change strcmp to strcmpi for tests of odeopts 'Stats' and 'NormControl'.
author Rik <rik@octave.org>
date Fri, 23 Dec 2016 09:26:16 -0800
parents bb452f84a299
children 2d7eb612d043
line wrap: on
line diff
--- a/scripts/ode/ode45.m	Fri Dec 23 10:08:51 2016 +0100
+++ b/scripts/ode/ode45.m	Fri Dec 23 09:26:16 2016 -0800
@@ -187,7 +187,7 @@
     odeopts.InitialStep = odeopts.direction * ...
                           starting_stepsize (order, fun, trange(1), init,
                                              odeopts.AbsTol, odeopts.RelTol,
-                                             strcmp (odeopts.NormControl, "on"),
+                                             strcmpi (odeopts.NormControl, "on"),
                                              odeopts.funarguments);
   endif
 
@@ -237,7 +237,7 @@
   endif
 
   ## Print additional information if option Stats is set
-  if (strcmp (odeopts.Stats, "on"))
+  if (strcmpi (odeopts.Stats, "on"))
     nsteps    = solution.cntloop;             # cntloop from 2..end
     nfailed   = solution.cntcycles - nsteps;  # cntcycl from 1..end
     nfevals   = 6 * solution.cntcycles + 1;   # number of ode evaluations
@@ -262,7 +262,7 @@
       varargout{1}.xe = solution.event{3};  # Time info when an event occurred
       varargout{1}.ye = solution.event{4};  # Results when an event occurred
     endif
-    if (strcmp (odeopts.Stats, "on"))
+    if (strcmpi (odeopts.Stats, "on"))
       varargout{1}.stats = struct ();
       varargout{1}.stats.nsteps   = nsteps;
       varargout{1}.stats.nfailed  = nfailed;