diff scripts/linear-algebra/norm.m @ 4890:e7da90a1cc11

[project @ 2004-05-06 20:36:29 by jwe]
author jwe
date Thu, 06 May 2004 20:36:29 +0000
parents c5cf860b756d
children c08cb1098afc
line wrap: on
line diff
--- a/scripts/linear-algebra/norm.m
+++ b/scripts/linear-algebra/norm.m
@@ -68,6 +68,10 @@
     return;
   endif
 
+  if (ndims (x) > 2)
+    error ("norm: Only valid on 2-D objects")
+  endif
+
   ## Do we have a vector or matrix as the first argument?
 
   if (rows (x) == 1 || columns (x) == 1)