changeset 22692:5e2cb8fbfec7

odeplot.m: Redo changes accidentally reverted through merges from stable to default. * odeplot.m: Remove idx variable. Always convert y0 to column vector.
author Rik <rik@octave.org>
date Fri, 28 Oct 2016 08:31:10 -0700
parents b4c5fbaa96a8
children 644dcdfa0348
files scripts/ode/odeplot.m
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ode/odeplot.m	Fri Oct 28 09:15:20 2016 -0400
+++ b/scripts/ode/odeplot.m	Fri Oct 28 08:31:10 2016 -0700
@@ -93,9 +93,8 @@
   elseif (strcmp (flag, "init"))
     ## t is either the time slot [tstart tstop] or [t0, t1, ..., tn]
     ## y is the initial value vector for the ode solution
-    idx = 1;
     told = t(1);
-    yold = y(:,1);
+    yold = y(:);
     figure ();
     hlines = plot (told, yold, "o-");
     xlim ([t(1), t(end)]);  # Fix limits which also speeds up plotting
@@ -103,7 +102,7 @@
 
   elseif (strcmp (flag, "done"))
     ## Cleanup after ode solver has finished.
-    hlines = num_lines = told = yold = idx = [];
+    hlines = num_lines = told = yold = [];
 
   endif