changeset 22669:bcfcbb5653e6 stable

integrate_adaptive.m: Further refinement to orientation of approxvals (cset 7458bacc631a). * integrate_adaptive.m: Don't transpose approxvals if there is only a single evaluation time.
author Rik <rik@octave.org>
date Wed, 26 Oct 2016 10:19:22 -0700
parents a17848537a67
children 305706823a2d 143b120ddb83
files scripts/ode/private/integrate_adaptive.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ode/private/integrate_adaptive.m	Tue Oct 25 21:51:57 2016 -0700
+++ b/scripts/ode/private/integrate_adaptive.m	Wed Oct 26 10:19:22 2016 -0700
@@ -193,7 +193,7 @@
             approxvals = interp1 ([t_old, t(t_caught), t_new],
                                   [x_old, x(:, t_caught), x_new] .',
                                   approxtime, "linear") .';
-            if (isvector (approxvals))
+            if (isvector (approxvals) && ! isscalar (approxtime))
               approxvals = approxvals.';
             endif
             if (! isempty (options.OutputSel))
@@ -244,7 +244,7 @@
           approxvals = interp1 ([t_old, t_new],
                                 [x_old, x_new] .',
                                 approxtime, "linear") .';
-          if (isvector (approxvals))
+          if (isvector (approxvals) && ! isscalar (approxtime))
             approxvals = approxvals.';
           endif
           if (! isempty (options.OutputSel))