diff scripts/general/accumarray.m @ 10271:297996005012

1 more small fix in accumarray
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 08 Feb 2010 07:20:27 +0100
parents 217d36560dfa
children db613bccd992
line wrap: on
line diff
--- a/scripts/general/accumarray.m	Mon Feb 08 07:09:03 2010 +0100
+++ b/scripts/general/accumarray.m	Mon Feb 08 07:20:27 2010 +0100
@@ -148,7 +148,7 @@
         subs = num2cell (subs, 1);
       endif
       subs = sub2ind (sz, subs{:});
-    elseif (length (sz) < 2)
+    elseif (! isempty (sz) && length (sz) < 2)
       error ("accumarray: needs at least 2 dimensions");
     endif