changeset 13904:1c06f3713e0a

* pascal.m: Style fixes.
author John W. Eaton <jwe@octave.org>
date Mon, 21 Nov 2011 16:36:20 -0500
parents 7b5da9754554
children e98cd21d63ea
files scripts/special-matrix/pascal.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/special-matrix/pascal.m	Mon Nov 21 16:34:31 2011 -0500
+++ b/scripts/special-matrix/pascal.m	Mon Nov 21 16:36:20 2011 -0500
@@ -53,11 +53,11 @@
 
   if (t == -1)
     for j = 2:n
-      retval(j:n,j) = cumsum ( retval(j-1:n-1,j-1) );
+      retval(j:n,j) = cumsum (retval(j-1:n-1,j-1));
     endfor
   else
     for j = 2:n
-      retval(j:n,j) = -cumsum ( retval(j-1:n-1,j-1) );
+      retval(j:n,j) = -cumsum (retval(j-1:n-1,j-1));
     endfor
   endif
 
@@ -66,7 +66,7 @@
   elseif (t == 2)
     retval = rot90 (retval, 3);
     if (rem (n,2) != 1)
-      retval *= -1;
+      retval = -retval;
     endif
   endif