changeset 10271:297996005012

1 more small fix in accumarray
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 08 Feb 2010 07:20:27 +0100
parents 6ffed9bb5598
children 272179888089
files scripts/ChangeLog scripts/general/accumarray.m
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-08  Jaroslav Hajek  <highegg@gmail.com>
+
+	* general/accumarray.m: 1 more small fix.
+
 2010-02-06  Jaroslav Hajek  <highegg@gmail.com>
 
 	* general/accumarray.m: Small fixes.
--- a/scripts/general/accumarray.m
+++ b/scripts/general/accumarray.m
@@ -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