# HG changeset patch # User Ben Abbott # Date 1326159147 18000 # Node ID b33589ef9213867cff6c8bf22a80e360c5752b89 # Parent 9e6ec5f558277c21808c1c0e52beae1f8774b4ae plot3.m: Throw error if the input data exceeds two dimensions. diff -r 9e6ec5f55827 -r b33589ef9213 scripts/plot/plot3.m --- 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__ ();