changeset 14184:b33589ef9213 stable

plot3.m: Throw error if the input data exceeds two dimensions.
author Ben Abbott <bpabbott@mac.com>
date Mon, 09 Jan 2012 20:32:27 -0500
parents 9e6ec5f55827
children d584f90d2c47
files scripts/plot/plot3.m
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/plot3.m	Mon Jan 09 20:28:08 2012 -0500
+++ b/scripts/plot/plot3.m	Mon Jan 09 20:32:27 2012 -0500
@@ -170,6 +170,8 @@
 
       if (! size_equal (x, y, z))
         error ("plot3: x, y, and z must have the same shape");
+      elseif (ndims (x) > 2)
+        error ("plot3: x, y, and z must not have more than two dimensions");
       endif
 
       for i = 1 : columns (x)
@@ -222,6 +224,8 @@
 
       if (! size_equal (x, y, z))
         error ("plot3: x, y, and z must have the same shape");
+      elseif (ndims (x) > 2)
+        error ("plot3: x, y, and z must not have more than two dimensions");
       endif
 
       options =  __default_plot_options__ ();
@@ -294,6 +298,8 @@
 
     if (! size_equal (x, y, z))
       error ("plot3: x, y, and z must have the same shape");
+    elseif (ndims (x) > 2)
+      error ("plot3: x, y, and z must not have more than two dimensions");
     endif
 
     options =  __default_plot_options__ ();