changeset 18642:a07814a8ffb0

interp1.m: Small formatting changes only. * interp1.m: Keep line lengths < 80 characters. Use if/elseif to avoid one unnecessary calculation.
author Rik <rik@octave.org>
date Tue, 08 Apr 2014 20:08:27 -0700
parents 4792a115c735
children ac75140f2c97
files scripts/general/interp1.m
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/interp1.m	Tue Apr 08 20:02:18 2014 -0700
+++ b/scripts/general/interp1.m	Tue Apr 08 20:08:27 2014 -0700
@@ -195,10 +195,8 @@
     else
       rightcontinuous = true;
     endif
-  endif
-
-  if ((rightcontinuous && (x(end) < x(1)))
-      || (! rightcontinuous && (x(end) > x(1))))
+  elseif ((rightcontinuous && (x(end) < x(1)))
+          || (! rightcontinuous && (x(end) > x(1))))
     ## Switch between left-continuous and right-continuous
     x = flipud (x);
     y = flipud (y);
@@ -217,7 +215,8 @@
           warning ("interp1: multiple discontinuities at the same X value");
         endif
       else
-        error ("interp1: discontinuities not supported for method '%s'", method);
+        error ("interp1: discontinuities not supported for method '%s'",
+                                                                   method);
       endif
     endif
   endif
@@ -240,6 +239,7 @@
       pp = mkpp ([x(1), x(1)+[0.5:(nx-1)]*dx, x(nx)],
                  shiftdim (y, 1), szy(2:end));
       pp.orient = "first";
+
       if (ispp)
         yi = pp;
       else