# HG changeset patch # User Rik # Date 1324015383 28800 # Node ID 5b49cafe059982abb905d14038b8340ab709c905 # Parent 324b2ec6214da8c0a4cb2a28a1c96864e5e0d1cd Use non-negative, non-positive with hyphens in error messages. * accumarray.m, polyfit.m, factorial.m, nchoosek.m, mcnemar_test.m, find.cc, graphics.cc, sparse.cc: Use non-negative, non-positive with hyphens in error messages for consistency with documentation. diff -r 324b2ec6214d -r 5b49cafe0599 scripts/general/accumarray.m --- a/scripts/general/accumarray.m Thu Dec 15 21:25:59 2011 -0800 +++ b/scripts/general/accumarray.m Thu Dec 15 22:03:03 2011 -0800 @@ -264,7 +264,7 @@ elseif (islogical (vals)) zero = true; elseif (fillval == 0 && all (vals(:) <= 0)) - ## This is a common case - fillval is zero, all numbers nonpositive. + ## This is a common case - fillval is zero, all numbers non-positive. zero = 0; else zero = NaN; # Neutral value. diff -r 324b2ec6214d -r 5b49cafe0599 scripts/polynomial/polyfit.m --- a/scripts/polynomial/polyfit.m Thu Dec 15 21:25:59 2011 -0800 +++ b/scripts/polynomial/polyfit.m Thu Dec 15 22:03:03 2011 -0800 @@ -77,7 +77,7 @@ endif if (! (isscalar (n) && n >= 0 && ! isinf (n) && n == fix (n))) - error ("polyfit: N must be a nonnegative integer"); + error ("polyfit: N must be a non-negative integer"); endif y_is_row_vector = (rows (y) == 1); diff -r 324b2ec6214d -r 5b49cafe0599 scripts/specfun/factorial.m --- a/scripts/specfun/factorial.m Thu Dec 15 21:25:59 2011 -0800 +++ b/scripts/specfun/factorial.m Thu Dec 15 22:03:03 2011 -0800 @@ -30,7 +30,7 @@ if (nargin != 1) print_usage (); elseif (any (n(:) < 0 | n(:) != fix (n(:)))) - error ("factorial: N must all be nonnegative integers"); + error ("factorial: N must all be non-negative integers"); endif x = round (gamma (n+1)); endfunction @@ -38,5 +38,5 @@ %!assert (factorial(5), prod(1:5)) %!assert (factorial([1,2;3,4]), [1,2;6,24]) %!assert (factorial(70), exp(sum(log(1:70))), -128*eps) -%!fail ('factorial(5.5)', "must all be nonnegative integers") -%!fail ('factorial(-3)', "must all be nonnegative integers") +%!fail ('factorial(5.5)', "must all be non-negative integers") +%!fail ('factorial(-3)', "must all be non-negative integers") diff -r 324b2ec6214d -r 5b49cafe0599 scripts/specfun/nchoosek.m --- a/scripts/specfun/nchoosek.m Thu Dec 15 21:25:59 2011 -0800 +++ b/scripts/specfun/nchoosek.m Thu Dec 15 22:03:03 2011 -0800 @@ -68,7 +68,7 @@ endif if ((isscalar(v) && v < k) || k < 0 || k != round(k) || any (v < 0 || v != round(v))) - error ("nchoosek: args are nonnegative integers with V not less than K"); + error ("nchoosek: args are non-negative integers with V not less than K"); endif n = length (v); diff -r 324b2ec6214d -r 5b49cafe0599 scripts/statistics/tests/mcnemar_test.m --- a/scripts/statistics/tests/mcnemar_test.m Thu Dec 15 21:25:59 2011 -0800 +++ b/scripts/statistics/tests/mcnemar_test.m Thu Dec 15 22:03:03 2011 -0800 @@ -43,7 +43,7 @@ if (! (min (size (x)) > 1) && issquare (x)) error ("mcnemar_test: X must be a square matrix of size > 1"); elseif (! (all (all (x >= 0)) && all (all (x == fix (x))))) - error ("mcnemar_test: all entries of X must be nonnegative integers"); + error ("mcnemar_test: all entries of X must be non-negative integers"); endif r = rows (x); diff -r 324b2ec6214d -r 5b49cafe0599 src/DLD-FUNCTIONS/find.cc --- a/src/DLD-FUNCTIONS/find.cc Thu Dec 15 21:25:59 2011 -0800 +++ b/src/DLD-FUNCTIONS/find.cc Thu Dec 15 22:03:03 2011 -0800 @@ -413,7 +413,7 @@ if (error_state || (val < 0 || (! xisinf (val) && val != xround (val)))) { - error ("find: N must be a nonnegative integer"); + error ("find: N must be a non-negative integer"); return retval; } else if (! xisinf (val)) diff -r 324b2ec6214d -r 5b49cafe0599 src/graphics.cc --- a/src/graphics.cc Thu Dec 15 21:25:59 2011 -0800 +++ b/src/graphics.cc Thu Dec 15 22:03:03 2011 -0800 @@ -5682,7 +5682,7 @@ } if ((min_val <= 0 && max_val > 0)) { - warning ("axis: omitting nonpositive data in log plot"); + warning ("axis: omitting non-positive data in log plot"); min_val = min_pos; } // FIXME -- maybe this test should also be relative? diff -r 324b2ec6214d -r 5b49cafe0599 src/sparse.cc --- a/src/sparse.cc Thu Dec 15 21:25:59 2011 -0800 +++ b/src/sparse.cc Thu Dec 15 22:03:03 2011 -0800 @@ -177,7 +177,7 @@ if (! error_state && (m < 0 || n < 0)) - error ("sparse: dimensions must be nonnegative"); + error ("sparse: dimensions must be non-negative"); } else if (nargin != 3) print_usage ();