# HG changeset patch # User Nicholas R. Jankowski # Date 1666821919 14400 # Node ID fa3ae8fd844964e155af6f6a260523d9a46bbebe # Parent 014648ce3267b0f00577cb0006623c80300ed0d4 normalize.m: correct error messages split across lines (bug #55765) * normalize.m: add brackets to split error messages to avoid truncating the message. Fix BISTs to match. diff -r 014648ce3267 -r fa3ae8fd8449 scripts/statistics/normalize.m --- a/scripts/statistics/normalize.m Wed Oct 26 17:32:52 2022 -0400 +++ b/scripts/statistics/normalize.m Wed Oct 26 18:05:19 2022 -0400 @@ -206,8 +206,8 @@ ##FIXME: remove error on next line when Tables is implemented error ("normalize: DataVariables method not yet implemented."); if (vararg_idx == (nargin - 1)) - error ("normalize: DataVariables requires a table variable", ... - " be specified"); + error (["normalize: DataVariables requires a table variable", ... + " be specified"]); elseif (datavariables_flag == true) error ("normalize: DataVariables may only be specified once"); else @@ -274,8 +274,8 @@ methodoption = nextprop; vararg_idx++; else - error ("normalize: 'norm' option must be a positive scalar or ", - "Inf"); + error (["normalize: 'norm' option must be a positive ", ... + "scalar or Inf"]); endif endif if (isempty (methodoption)) @@ -293,8 +293,8 @@ methodoption = nextprop; vararg_idx++; else - error ("normalize: 'range' must be specified as a ", ... - "2-element row vector [a b]"); + error (["normalize: 'range' must be specified as a ", ... + "2-element row vector [a b]"]); endif endif if (isempty (methodoption)) @@ -630,9 +630,9 @@ %!error normalize ([1 2 3], "norm", "zscore") %!error normalize ([1 2 3], "norm", "foo") %!error normalize ([1 2 3], "scale", "center", "norm") -%!error <'norm' option must be a positive scalar or> normalize ([1 2 3], "norm", -1) -%!error <'norm' option must be a positive scalar or> normalize ([1 2 3], "norm", -Inf) -%!error <'norm' option must be a positive scalar or> normalize ([1 2 3], "norm", [1 2]) +%!error <'norm' option must be a positive scalar or Inf> normalize ([1 2 3], "norm", -1) +%!error <'norm' option must be a positive scalar or Inf> normalize ([1 2 3], "norm", -Inf) +%!error <'norm' option must be a positive scalar or Inf> normalize ([1 2 3], "norm", [1 2]) %!error <'range' must be specified as> normalize ([1 2 3], "range", [1 2]') %!error <'range' must be specified as> normalize ([1 2 3], "range", [1 2 3]) %!error <'range' must be specified as> normalize ([1 2 3], "range", 1)