changeset 31286:10a813492497

maint: Use "nonzero" in docstrings and error messages. * movie.m, mustBeNonzero.m, lsqnonneg.m, pqpnonneg.m: Use "nonzero" in docstrings and error messages.
author Rik <rik@octave.org>
date Mon, 10 Oct 2022 18:17:16 -0700
parents d8d2b5661082
children 2008859463c3
files scripts/image/movie.m scripts/miscellaneous/mustBeNonzero.m scripts/optimization/lsqnonneg.m scripts/optimization/pqpnonneg.m
diffstat 4 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/image/movie.m	Sun Oct 09 16:35:20 2022 -0400
+++ b/scripts/image/movie.m	Mon Oct 10 18:17:16 2022 -0700
@@ -103,7 +103,7 @@
   if (nargin > 1)
     n = varargin{2};
     if (! isindex (abs (n(1))))
-      error ("movie: N must be a non-zero integer");
+      error ("movie: N must be a nonzero integer");
     endif
 
     if (! isscalar (n))
@@ -249,9 +249,9 @@
 %!error <MOV must be a frame struct array> movie ({2})
 %!error <MOV must contain at least two frames>
 %! movie (struct ("cdata", [], "colormap", []));
-%!error <N must be a non-zero integer>
+%!error <N must be a nonzero integer>
 %! movie (struct ("cdata", {[], []}, "colormap", []), 2.3);
-%!error <N must be a non-zero integer>
+%!error <N must be a nonzero integer>
 %! movie (struct ("cdata", {[], []}, "colormap", []), [2.3 -6]);
 %!error <All elements N\(2:end\) must be valid indices into the MOV struct>
 %! movie (struct ("cdata", {[], []}, "colormap", []), [1 -1]);
--- a/scripts/miscellaneous/mustBeNonzero.m	Sun Oct 09 16:35:20 2022 -0400
+++ b/scripts/miscellaneous/mustBeNonzero.m	Mon Oct 10 18:17:16 2022 -0700
@@ -47,7 +47,7 @@
       label = "input";
     endif
     bad_idx = find (tf);
-    errmsg = sprintf ("%s must be non-zero; found %d elements that were zero: indexes %s", ...
+    errmsg = sprintf ("%s must be nonzero; found %d elements that were zero: indexes %s", ...
                       label, numel (bad_idx), mat2str (bad_idx));
     error (errmsg);
   endif
--- a/scripts/optimization/lsqnonneg.m	Sun Oct 09 16:35:20 2022 -0400
+++ b/scripts/optimization/lsqnonneg.m	Mon Oct 10 18:17:16 2022 -0700
@@ -69,7 +69,7 @@
 ## @end itemize
 ##
 ## @item lambda
-## Lagrange multipliers.  If these are non-zero, the corresponding @var{x}
+## Lagrange multipliers.  If these are nonzero, the corresponding @var{x}
 ## values should be zero, indicating the solution is pressed up against a
 ## coordinate plane.  The magnitude indicates how much the residual would
 ## improve if the @code{@var{x} >= 0} constraints were relaxed in that
--- a/scripts/optimization/pqpnonneg.m	Sun Oct 09 16:35:20 2022 -0400
+++ b/scripts/optimization/pqpnonneg.m	Mon Oct 10 18:17:16 2022 -0700
@@ -71,7 +71,7 @@
 ## @end itemize
 ##
 ## @item lambda
-## Lagrange multipliers.  If these are non-zero, the corresponding @var{x}
+## Lagrange multipliers.  If these are nonzero, the corresponding @var{x}
 ## values should be zero, indicating the solution is pressed up against a
 ## coordinate plane.  The magnitude indicates how much the residual would
 ## improve if the @code{@var{x} >= 0} constraints were relaxed in that