changeset 17471:997b700b6ad4

compass.m: Add %!error input validation tests. * scripts/plot/compass.m: Add %!error input validation tests.
author Rik <rik@octave.org>
date Tue, 24 Sep 2013 13:17:02 -0700
parents 576cf0589c6d
children bddb9688e41c
files scripts/plot/compass.m
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/compass.m	Tue Sep 24 13:16:50 2013 -0700
+++ b/scripts/plot/compass.m	Tue Sep 24 13:17:02 2013 -0700
@@ -88,7 +88,7 @@
   endif
 
   ## Matlab draws compass plots with the arrow head as one continous line,
-  ## and each arrow separately.  This is completely different than quiver
+  ## and each arrow separately.  This is completely different from quiver
   ## and quite ugly.
   n = length (u);
   xend = u;
@@ -128,3 +128,10 @@
 %! a = toeplitz ([1;randn_9x1_data], [1,randn_1x9_data]);
 %! compass (eig (a));
 
+%% Test input validation
+%!error compass ()
+%!error compass (1,2,3,4)
+%!error compass (1, "-r", 2)
+%!error <invalid linestyle STYLE> compass (1, "abc")
+%!error <invalid linestyle STYLE> compass (1, {1})
+