diff scripts/general/mod.m @ 4844:9f7ef92b50b0

[project @ 2004-04-02 17:26:53 by jwe]
author jwe
date Fri, 02 Apr 2004 17:26:54 +0000
parents 22bd65326ec1
children c08cb1098afc
line wrap: on
line diff
--- a/scripts/general/mod.m
+++ b/scripts/general/mod.m
@@ -44,7 +44,8 @@
     usage ("r = mod (x, y)");
   endif
 
-  if (any (size (x) != size (y)) && ! (isscalar (x) || isscalar (y)))
+  if (((ndims (x) != ndims (y)) || any (size (x) != size (y))) &&
+	 ! (isscalar (x) || isscalar (y)))
     error ("mod: argument sizes must agree");
   endif