diff scripts/general/accumdim.m @ 10790:01f1643dfbb1

fix flipdim with trailing singleton dims
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 15 Jul 2010 12:15:14 +0200
parents fbd7843974fa
children b1f4bdc276b6
line wrap: on
line diff
--- a/scripts/general/accumdim.m	Wed Jul 14 19:29:02 2010 -0400
+++ b/scripts/general/accumdim.m	Thu Jul 15 12:15:14 2010 +0200
@@ -78,7 +78,7 @@
   sz = size (val);
 
   if (nargin < 3)
-    [~, dim] = max (sz > 1); # first non-singleton dim
+    [~, dim] = max (sz != 1); # first non-singleton dim
   elseif (! isindex (dim))
     error ("accumdim: DIM must be a valid dimension");
   elseif (dim > length (sz))