diff scripts/general/flipud.m @ 4869:b92d59213e63

[project @ 2004-04-21 17:03:02 by jwe]
author jwe
date Wed, 21 Apr 2004 17:03:02 +0000
parents f8dde1807dee
children c08cb1098afc
line wrap: on
line diff
--- a/scripts/general/flipud.m
+++ b/scripts/general/flipud.m
@@ -29,8 +29,12 @@
 ##          1  2
 ## @end group
 ## @end example
+##
+## Due to the difficulty of defining which axis about which to flip the 
+## matrix @code{flipud} only work with 2-d arrays.  To flip N-d arrays
+## use @code{flipdim} instead.
 ## @end deftypefn
-## @seealso{fliplr and rot90}
+## @seealso{fliplr, flipdim, rot90 and rotdim}
 
 ## Author: jwe
 
@@ -40,6 +44,10 @@
     usage ("flipud (x)");
   endif
 
+  if (ndims (x) > 2)
+    error ("flipud: Only works with 2-d arrays")
+  endif
+
   nr = rows (x);
   y = x (nr:-1:1, :);