Mercurial > hg > octave-nkf
diff scripts/plot/plot3.m @ 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 | 72c96de7a403 |
children | 11949c9795a0 4d917a6a858b |
line wrap: on
line diff
--- a/scripts/plot/plot3.m +++ b/scripts/plot/plot3.m @@ -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__ ();