diff scripts/general/flipdim.m @ 9510:1b290ce305fb

add omitted check in flipdim
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 10 Aug 2009 11:35:59 +0200
parents e5e4e404a59d
children b32a0214a464
line wrap: on
line diff
--- a/scripts/general/flipdim.m	Mon Aug 10 10:08:10 2009 +0200
+++ b/scripts/general/flipdim.m	Mon Aug 10 11:35:59 2009 +0200
@@ -48,7 +48,7 @@
       dim = 1;
     endif
   else
-    if (! isindex (dim, nd))
+    if (! (isscalar (dim) && isindex (dim, nd)))
       error ("flipdim: dim must be an integer and valid dimension");
     endif
   endif