changeset 22683:340e37fd3c20

odeplot.m: Ensure 'init' value is column vector. * odeplot.m: Use y = y(:) as all other ode functions do.
author Rik <rik@octave.org>
date Thu, 27 Oct 2016 17:18:27 -0700
parents 05308824fbcf
children a3e4c8fb69cb
files scripts/ode/odeplot.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ode/odeplot.m	Thu Oct 27 16:03:49 2016 -0700
+++ b/scripts/ode/odeplot.m	Thu Oct 27 17:18:27 2016 -0700
@@ -94,7 +94,7 @@
     ## t is either the time slot [tstart tstop] or [t0, t1, ..., tn]
     ## y is the initial value vector for the ode solution
     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