changeset 30875:5d3faba0342e

doc: Ensure documentation lists output argument when it exists for all m-files. For new users of Octave it is best to show explicit calling forms in the documentation and to show a return argument when it exists. * bp-table.cc, shift.m, accumarray.m, accumdim.m, bincoeff.m, bitcmp.m, bitget.m, bitset.m, blkdiag.m, celldisp.m, cplxpair.m, dblquad.m, flip.m, fliplr.m, flipud.m, idivide.m, int2str.m, interpft.m, logspace.m, num2str.m, polyarea.m, postpad.m, prepad.m, randi.m, repmat.m, rng.m, rot90.m, rotdim.m, structfun.m, triplequad.m, uibuttongroup.m, uicontrol.m, uipanel.m, uipushtool.m, uitoggletool.m, uitoolbar.m, waitforbuttonpress.m, help.m, __additional_help_message__.m, hsv.m, im2double.m, im2frame.m, javachk.m, usejava.m, argnames.m, char.m, formula.m, inline.m, __vectorize__.m, findstr.m, flipdim.m, strmatch.m, vectorize.m, commutation_matrix.m, cond.m, cross.m, duplication_matrix.m, expm.m, orth.m, rank.m, rref.m, trace.m, vech.m, cast.m, compare_versions.m, delete.m, dir.m, fileattrib.m, grabcode.m, gunzip.m, inputname.m, license.m, list_primes.m, ls.m, mexext.m, movefile.m, namelengthmax.m, nargoutchk.m, nthargout.m, substruct.m, swapbytes.m, ver.m, verLessThan.m, what.m, fminunc.m, fsolve.m, fzero.m, optimget.m, __fdjac__.m, matlabroot.m, savepath.m, campos.m, camroll.m, camtarget.m, camup.m, camva.m, camzoom.m, clabel.m, diffuse.m, legend.m, orient.m, rticks.m, specular.m, thetaticks.m, xlim.m, xtickangle.m, xticklabels.m, xticks.m, ylim.m, ytickangle.m, yticklabels.m, yticks.m, zlim.m, ztickangle.m, zticklabels.m, zticks.m, ellipsoid.m, isocolors.m, isonormals.m, stairs.m, surfnorm.m, __actual_axis_position__.m, __pltopt__.m, close.m, graphics_toolkit.m, pan.m, print.m, printd.m, __ghostscript__.m, __gnuplot_print__.m, __opengl_print__.m, rotate3d.m, subplot.m, zoom.m, compan.m, conv.m, poly.m, polyaffine.m, polyder.m, polyint.m, polyout.m, polyreduce.m, polyvalm.m, roots.m, prefdir.m, prefsfile.m, profexplore.m, profexport.m, profshow.m, powerset.m, unique.m, arch_rnd.m, arma_rnd.m, autoreg_matrix.m, bartlett.m, blackman.m, detrend.m, durbinlevinson.m, fftconv.m, fftfilt.m, fftshift.m, fractdiff.m, hamming.m, hanning.m, hurst.m, ifftshift.m, rectangle_lw.m, rectangle_sw.m, triangle_lw.m, sinc.m, sinetone.m, sinewave.m, spectral_adf.m, spectral_xdf.m, spencer.m, ilu.m, __sprand__.m, sprand.m, sprandn.m, sprandsym.m, treelayout.m, beta.m, betainc.m, betaincinv.m, betaln.m, cosint.m, expint.m, factorial.m, gammainc.m, gammaincinv.m, lcm.m, nthroot.m, perms.m, reallog.m, realpow.m, realsqrt.m, sinint.m, hadamard.m, hankel.m, hilb.m, invhilb.m, magic.m, pascal.m, rosser.m, toeplitz.m, vander.m, wilkinson.m, center.m, corr.m, cov.m, discrete_cdf.m, discrete_inv.m, discrete_pdf.m, discrete_rnd.m, empirical_cdf.m, empirical_inv.m, empirical_pdf.m, empirical_rnd.m, kendall.m, kurtosis.m, mad.m, mean.m, meansq.m, median.m, mode.m, moment.m, range.m, ranks.m, run_count.m, skewness.m, spearman.m, statistics.m, std.m, base2dec.m, bin2dec.m, blanks.m, cstrcat.m, deblank.m, dec2base.m, dec2bin.m, dec2hex.m, hex2dec.m, index.m, regexptranslate.m, rindex.m, strcat.m, strjust.m, strtrim.m, strtrunc.m, substr.m, untabify.m, __have_feature__.m, __prog_output_assert__.m, __run_test_suite__.m, example.m, fail.m, asctime.m, calendar.m, ctime.m, date.m, etime.m: Add return arguments to @deftypefn macros where they were missing. Rename variables in functions (particularly generic "retval") to match documentation. Rename some return variables for (hopefully) better clarity (e.g., 'ax' to 'hax' to indicate it is a graphics handle to an axes object).
author Rik <rik@octave.org>
date Wed, 30 Mar 2022 20:40:27 -0700
parents 2b07748dbae3
children 6ddc9c9bab50
files libinterp/parse-tree/bp-table.cc scripts/deprecated/shift.m scripts/general/accumarray.m scripts/general/accumdim.m scripts/general/bincoeff.m scripts/general/bitcmp.m scripts/general/bitget.m scripts/general/bitset.m scripts/general/blkdiag.m scripts/general/celldisp.m scripts/general/cplxpair.m scripts/general/dblquad.m scripts/general/flip.m scripts/general/fliplr.m scripts/general/flipud.m scripts/general/idivide.m scripts/general/int2str.m scripts/general/interpft.m scripts/general/logspace.m scripts/general/num2str.m scripts/general/polyarea.m scripts/general/postpad.m scripts/general/prepad.m scripts/general/randi.m scripts/general/repmat.m scripts/general/rng.m scripts/general/rot90.m scripts/general/rotdim.m scripts/general/structfun.m scripts/general/triplequad.m scripts/gui/uibuttongroup.m scripts/gui/uicontrol.m scripts/gui/uipanel.m scripts/gui/uipushtool.m scripts/gui/uitoggletool.m scripts/gui/uitoolbar.m scripts/gui/waitforbuttonpress.m scripts/help/help.m scripts/help/private/__additional_help_message__.m scripts/image/hsv.m scripts/image/im2double.m scripts/image/im2frame.m scripts/java/javachk.m scripts/java/usejava.m scripts/legacy/@inline/argnames.m scripts/legacy/@inline/char.m scripts/legacy/@inline/formula.m scripts/legacy/@inline/inline.m scripts/legacy/__vectorize__.m scripts/legacy/findstr.m scripts/legacy/flipdim.m scripts/legacy/strmatch.m scripts/legacy/vectorize.m scripts/linear-algebra/commutation_matrix.m scripts/linear-algebra/cond.m scripts/linear-algebra/cross.m scripts/linear-algebra/duplication_matrix.m scripts/linear-algebra/expm.m scripts/linear-algebra/orth.m scripts/linear-algebra/rank.m scripts/linear-algebra/rref.m scripts/linear-algebra/trace.m scripts/linear-algebra/vech.m scripts/miscellaneous/cast.m scripts/miscellaneous/compare_versions.m scripts/miscellaneous/delete.m scripts/miscellaneous/dir.m scripts/miscellaneous/fileattrib.m scripts/miscellaneous/grabcode.m scripts/miscellaneous/gunzip.m scripts/miscellaneous/inputname.m scripts/miscellaneous/license.m scripts/miscellaneous/list_primes.m scripts/miscellaneous/ls.m scripts/miscellaneous/mexext.m scripts/miscellaneous/movefile.m scripts/miscellaneous/namelengthmax.m scripts/miscellaneous/nargoutchk.m scripts/miscellaneous/nthargout.m scripts/miscellaneous/substruct.m scripts/miscellaneous/swapbytes.m scripts/miscellaneous/ver.m scripts/miscellaneous/verLessThan.m scripts/miscellaneous/what.m scripts/optimization/fminunc.m scripts/optimization/fsolve.m scripts/optimization/fzero.m scripts/optimization/optimget.m scripts/optimization/private/__fdjac__.m scripts/path/matlabroot.m scripts/path/savepath.m scripts/plot/appearance/campos.m scripts/plot/appearance/camroll.m scripts/plot/appearance/camtarget.m scripts/plot/appearance/camup.m scripts/plot/appearance/camva.m scripts/plot/appearance/camzoom.m scripts/plot/appearance/clabel.m scripts/plot/appearance/diffuse.m scripts/plot/appearance/legend.m scripts/plot/appearance/orient.m scripts/plot/appearance/rticks.m scripts/plot/appearance/specular.m scripts/plot/appearance/thetaticks.m scripts/plot/appearance/xlim.m scripts/plot/appearance/xtickangle.m scripts/plot/appearance/xticklabels.m scripts/plot/appearance/xticks.m scripts/plot/appearance/ylim.m scripts/plot/appearance/ytickangle.m scripts/plot/appearance/yticklabels.m scripts/plot/appearance/yticks.m scripts/plot/appearance/zlim.m scripts/plot/appearance/ztickangle.m scripts/plot/appearance/zticklabels.m scripts/plot/appearance/zticks.m scripts/plot/draw/ellipsoid.m scripts/plot/draw/isocolors.m scripts/plot/draw/isonormals.m scripts/plot/draw/stairs.m scripts/plot/draw/surfnorm.m scripts/plot/util/__actual_axis_position__.m scripts/plot/util/__pltopt__.m scripts/plot/util/close.m scripts/plot/util/graphics_toolkit.m scripts/plot/util/pan.m scripts/plot/util/print.m scripts/plot/util/printd.m scripts/plot/util/private/__ghostscript__.m scripts/plot/util/private/__gnuplot_print__.m scripts/plot/util/private/__opengl_print__.m scripts/plot/util/rotate3d.m scripts/plot/util/subplot.m scripts/plot/util/zoom.m scripts/polynomial/compan.m scripts/polynomial/conv.m scripts/polynomial/poly.m scripts/polynomial/polyaffine.m scripts/polynomial/polyder.m scripts/polynomial/polyint.m scripts/polynomial/polyout.m scripts/polynomial/polyreduce.m scripts/polynomial/polyvalm.m scripts/polynomial/roots.m scripts/prefs/prefdir.m scripts/prefs/private/prefsfile.m scripts/profiler/profexplore.m scripts/profiler/profexport.m scripts/profiler/profshow.m scripts/set/powerset.m scripts/set/unique.m scripts/signal/arch_rnd.m scripts/signal/arma_rnd.m scripts/signal/autoreg_matrix.m scripts/signal/bartlett.m scripts/signal/blackman.m scripts/signal/detrend.m scripts/signal/durbinlevinson.m scripts/signal/fftconv.m scripts/signal/fftfilt.m scripts/signal/fftshift.m scripts/signal/fractdiff.m scripts/signal/hamming.m scripts/signal/hanning.m scripts/signal/hurst.m scripts/signal/ifftshift.m scripts/signal/private/rectangle_lw.m scripts/signal/private/rectangle_sw.m scripts/signal/private/triangle_lw.m scripts/signal/sinc.m scripts/signal/sinetone.m scripts/signal/sinewave.m scripts/signal/spectral_adf.m scripts/signal/spectral_xdf.m scripts/signal/spencer.m scripts/sparse/ilu.m scripts/sparse/private/__sprand__.m scripts/sparse/sprand.m scripts/sparse/sprandn.m scripts/sparse/sprandsym.m scripts/sparse/treelayout.m scripts/specfun/beta.m scripts/specfun/betainc.m scripts/specfun/betaincinv.m scripts/specfun/betaln.m scripts/specfun/cosint.m scripts/specfun/expint.m scripts/specfun/factorial.m scripts/specfun/gammainc.m scripts/specfun/gammaincinv.m scripts/specfun/lcm.m scripts/specfun/nthroot.m scripts/specfun/perms.m scripts/specfun/reallog.m scripts/specfun/realpow.m scripts/specfun/realsqrt.m scripts/specfun/sinint.m scripts/special-matrix/hadamard.m scripts/special-matrix/hankel.m scripts/special-matrix/hilb.m scripts/special-matrix/invhilb.m scripts/special-matrix/magic.m scripts/special-matrix/pascal.m scripts/special-matrix/rosser.m scripts/special-matrix/toeplitz.m scripts/special-matrix/vander.m scripts/special-matrix/wilkinson.m scripts/statistics/center.m scripts/statistics/corr.m scripts/statistics/cov.m scripts/statistics/discrete_cdf.m scripts/statistics/discrete_inv.m scripts/statistics/discrete_pdf.m scripts/statistics/discrete_rnd.m scripts/statistics/empirical_cdf.m scripts/statistics/empirical_inv.m scripts/statistics/empirical_pdf.m scripts/statistics/empirical_rnd.m scripts/statistics/kendall.m scripts/statistics/kurtosis.m scripts/statistics/mad.m scripts/statistics/mean.m scripts/statistics/meansq.m scripts/statistics/median.m scripts/statistics/mode.m scripts/statistics/moment.m scripts/statistics/range.m scripts/statistics/ranks.m scripts/statistics/run_count.m scripts/statistics/skewness.m scripts/statistics/spearman.m scripts/statistics/statistics.m scripts/statistics/std.m scripts/strings/base2dec.m scripts/strings/bin2dec.m scripts/strings/blanks.m scripts/strings/cstrcat.m scripts/strings/deblank.m scripts/strings/dec2base.m scripts/strings/dec2bin.m scripts/strings/dec2hex.m scripts/strings/hex2dec.m scripts/strings/index.m scripts/strings/regexptranslate.m scripts/strings/rindex.m scripts/strings/strcat.m scripts/strings/strjust.m scripts/strings/strtrim.m scripts/strings/strtrunc.m scripts/strings/substr.m scripts/strings/untabify.m scripts/testfun/__have_feature__.m scripts/testfun/__prog_output_assert__.m scripts/testfun/__run_test_suite__.m scripts/testfun/example.m scripts/testfun/fail.m scripts/time/asctime.m scripts/time/calendar.m scripts/time/ctime.m scripts/time/date.m scripts/time/etime.m
diffstat 261 files changed, 1245 insertions(+), 1190 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.cc	Wed Mar 30 17:30:18 2022 -0700
+++ b/libinterp/parse-tree/bp-table.cc	Wed Mar 30 20:40:27 2022 -0700
@@ -538,14 +538,14 @@
 %! dbclear all;   # Clear out breakpoints before test
 %! dbstop help;
 %! dbstop in ls;
-%! dbstop help at 104;
-%! dbstop in ls 102;     ## 102 is a comment; code line is at 105
+%! dbstop help at 105;  # 105 is a comment; code line is at 106
+%! dbstop in ls 102;
 %! dbstop help 204 if a==5;
 %! dbstop if error Octave:undefined-function;
 %! s = dbstatus;
 %! dbclear all;
 %! assert ({s.bkpt(:).name}, {"help", "help", "help>do_contents", "ls", "ls"});
-%! assert ([s.bkpt(:).line], [55, 105, 207, 63, 102]);
+%! assert ([s.bkpt(:).line], [56, 106, 208, 63, 102]);
 %! assert (s.errs, {"Octave:undefined-function"});
 */
 
--- a/scripts/deprecated/shift.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/deprecated/shift.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} shift (@var{x}, @var{b})
-## @deftypefnx {} {} shift (@var{x}, @var{b}, @var{dim})
+## @deftypefn  {} {@var{y} =} shift (@var{x}, @var{b})
+## @deftypefnx {} {@var{y} =} shift (@var{x}, @var{b}, @var{dim})
 ##
 ## @code{shift} is deprecated and will be removed in Octave version 10.  Use
 ## @code{circshift} instead.
--- a/scripts/general/accumarray.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/accumarray.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} accumarray (@var{subs}, @var{vals}, @var{sz}, @var{func}, @var{fillval}, @var{issparse})
-## @deftypefnx {} {} accumarray (@var{subs}, @var{vals}, @dots{})
+## @deftypefn  {} {@var{A} =} accumarray (@var{subs}, @var{vals})
+## @deftypefnx {} {@var{A} =} accumarray (@var{subs}, @var{vals}, @var{sz})
+## @deftypefnx {} {@var{A} =} accumarray (@var{subs}, @var{vals}, @var{sz}, @var{func})
+## @deftypefnx {} {@var{A} =} accumarray (@var{subs}, @var{vals}, @var{sz}, @var{func}, @var{fillval})
+## @deftypefnx {} {@var{A} =} accumarray (@var{subs}, @var{vals}, @var{sz}, @var{func}, @var{fillval}, @var{issparse})
 ##
 ## Create an array by accumulating the elements of a vector into the
 ## positions defined by their subscripts.
--- a/scripts/general/accumdim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/accumdim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} accumdim (@var{subs}, @var{vals}, @var{dim}, @var{n}, @var{func}, @var{fillval})
+## @deftypefn  {} {@var{A} =} accumdim (@var{subs}, @var{vals})
+## @deftypefnx {} {@var{A} =} accumdim (@var{subs}, @var{vals}, @var{dim})
+## @deftypefnx {} {@var{A} =} accumdim (@var{subs}, @var{vals}, @var{dim}, @var{n})
+## @deftypefnx {} {@var{A} =} accumdim (@var{subs}, @var{vals}, @var{dim}, @var{n}, @var{func})
+## @deftypefnx {} {@var{A} =} accumdim (@var{subs}, @var{vals}, @var{dim}, @var{n}, @var{func}, @var{fillval})
 ## Create an array by accumulating the slices of an array into the
 ## positions defined by their subscripts along a specified dimension.
 ##
--- a/scripts/general/bincoeff.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/bincoeff.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} bincoeff (@var{n}, @var{k})
+## @deftypefn {} {@var{b} =} bincoeff (@var{n}, @var{k})
 ## Return the binomial coefficient of @var{n} and @var{k}.
 ##
 ## The binomial coefficient is defined as
--- a/scripts/general/bitcmp.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/bitcmp.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} bitcmp (@var{A}, @var{k})
+## @deftypefn {} {@var{C} =} bitcmp (@var{A}, @var{k})
 ## Return the @var{k}-bit complement of integers in @var{A}.
 ##
 ## If @var{k} is omitted @code{k = log2 (flintmax) + 1} is assumed.
--- a/scripts/general/bitget.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/bitget.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {@var{c} =} bitget (@var{A}, @var{n})
-## Return the status of bit(s) @var{n} of the unsigned integers in @var{A}.
+## @deftypefn {} {@var{C} =} bitget (@var{A}, @var{n})
+## Return the bit value at position(s) @var{n} of the unsigned integers in
+## @var{A}.
 ##
 ## The least significant bit is @var{n} = 1.
 ##
--- a/scripts/general/bitset.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/bitset.m	Wed Mar 30 20:40:27 2022 -0700
@@ -26,7 +26,7 @@
 ## -*- texinfo -*-
 ## @deftypefn  {} {@var{C} =} bitset (@var{A}, @var{n})
 ## @deftypefnx {} {@var{C} =} bitset (@var{A}, @var{n}, @var{val})
-## Set or reset bit(s) @var{n} of the unsigned integers in @var{A}.
+## Set or reset bit(s) at position @var{n} of the unsigned integers in @var{A}.
 ##
 ## The least significant bit is @var{n} = 1.  @w{@var{val} = 0} resets bits and
 ## @w{@var{val} = 1} sets bits.  If no @var{val} is specified it defaults to
--- a/scripts/general/blkdiag.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/blkdiag.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} blkdiag (@var{A}, @var{B}, @var{C}, @dots{})
+## @deftypefn {} {@var{M} =} blkdiag (@var{A}, @var{B}, @var{C}, @dots{})
 ## Build a block diagonal matrix from @var{A}, @var{B}, @var{C}, @dots{}
 ##
 ## All arguments must be numeric and either two-dimensional matrices or
@@ -32,7 +32,7 @@
 ## @seealso{diag, horzcat, vertcat, sparse}
 ## @end deftypefn
 
-function retval = blkdiag (varargin)
+function M = blkdiag (varargin)
 
   if (nargin < 1)
     print_usage ();
@@ -53,15 +53,15 @@
   csz = cumsum ([0 0; tmp], 1);
 
   if (any (cellfun ("issparse", varargin)))
-    retval = sparse (csz(end,1), csz(end,2));
+    M = sparse (csz(end,1), csz(end,2));
   else
-    retval = zeros (csz(end,:));
+    M = zeros (csz(end,:));
   endif
 
   for p = 1:nargin
     vp = varargin{p};
     if (! isempty (vp))
-      retval((csz(p,1)+1):csz(p+1,1),(csz(p,2)+1):csz(p+1,2)) = vp;
+      M((csz(p,1)+1):csz(p+1,1),(csz(p,2)+1):csz(p+1,2)) = vp;
     endif
   endfor
 
--- a/scripts/general/celldisp.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/celldisp.m	Wed Mar 30 20:40:27 2022 -0700
@@ -51,7 +51,7 @@
 ## @seealso{disp}
 ## @end deftypefn
 
-## This is ugly, but seems to be what matlab does..
+## This is ugly, but seems to be what Matlab does..
 
 function celldisp (c, name)
 
--- a/scripts/general/cplxpair.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/cplxpair.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} cplxpair (@var{z})
-## @deftypefnx {} {} cplxpair (@var{z}, @var{tol})
-## @deftypefnx {} {} cplxpair (@var{z}, @var{tol}, @var{dim})
+## @deftypefn  {} {@var{zsort} =} cplxpair (@var{z})
+## @deftypefnx {} {@var{zsort} =} cplxpair (@var{z}, @var{tol})
+## @deftypefnx {} {@var{zsort} =} cplxpair (@var{z}, @var{tol}, @var{dim})
 ## Sort the numbers @var{z} into complex conjugate pairs ordered by increasing
 ## real part.
 ##
@@ -57,14 +57,14 @@
 
 ## 2006-05-12 David Bateman - Modified for NDArrays
 
-function y = cplxpair (z, tol, dim)
+function zsort = cplxpair (z, tol, dim)
 
   if (nargin < 1)
     print_usage ();
   endif
 
   if (isempty (z))
-    y = zeros (size (z));
+    zsort = zeros (size (z));
     return;
   endif
 
@@ -108,7 +108,7 @@
   [~, idx] = sort (q, 1);
   midx = idx + rows (idx) * ones (rows (idx), 1) * [0:columns(idx)-1];
   z = z(midx);
-  y = z;
+  zsort = z;
 
   ## For each remaining z, place the value and its conjugate at the start of
   ## the returned list, and remove them from further consideration.
@@ -125,16 +125,16 @@
       ## For pairs, select the one with positive imaginary part and use it and
       ## it's conjugate, but list the negative imaginary pair first.
       if (imag (z(i,j)) > 0)
-        y([i, i+1],j) = [conj(z(i,j)), z(i,j)];
+        zsort([i, i+1],j) = [conj(z(i,j)), z(i,j)];
       else
-        y([i, i+1],j) = [conj(z(idx+i,j)), z(idx+i,j)];
+        zsort([i, i+1],j) = [conj(z(idx+i,j)), z(idx+i,j)];
       endif
       z(idx+i,j) = z(i+1,j);
     endfor
   endfor
 
   ## Reshape the output matrix.
-  y = ipermute (reshape (y, sz), perm);
+  zsort = ipermute (reshape (zsort, sz), perm);
 
 endfunction
 
--- a/scripts/general/dblquad.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/dblquad.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb})
-## @deftypefnx {} {} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{tol})
-## @deftypefnx {} {} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{tol}, @var{quadf})
-## @deftypefnx {} {} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{tol}, @var{quadf}, @dots{})
+## @deftypefn  {} {@var{q} =} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb})
+## @deftypefnx {} {@var{q} =} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{tol})
+## @deftypefnx {} {@var{q} =} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{tol}, @var{quadf})
+## @deftypefnx {} {@var{q} =} dblquad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{tol}, @var{quadf}, @dots{})
 ## Numerically evaluate the double integral of @var{f}.
 ##
 ## @var{f} is a function handle, inline function, or string containing the name
--- a/scripts/general/flip.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/flip.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} flip (@var{x})
-## @deftypefnx {} {} flip (@var{x}, @var{dim})
-## Return a copy of array @var{x} flipped across dimension @var{dim}.
+## @deftypefn  {} {@var{B} =} flip (@var{A})
+## @deftypefnx {} {@var{B} =} flip (@var{A}, @var{dim})
+## Return a copy of array @var{A} flipped across dimension @var{dim}.
 ##
 ## If @var{dim} is unspecified it defaults to the first non-singleton
 ## dimension.
@@ -59,14 +59,14 @@
 ## @seealso{fliplr, flipud, rot90, rotdim, permute, transpose}
 ## @end deftypefn
 
-function y = flip (x, dim)
+function B = flip (A, dim)
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  nd = ndims (x);
-  sz = size (x);
+  nd = ndims (A);
+  sz = size (A);
   if (nargin == 1)
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
@@ -75,8 +75,8 @@
   endif
 
   idx(1:max(nd, dim)) = {':'};
-  idx{dim} = size (x, dim):-1:1;
-  y = x(idx{:});
+  idx{dim} = size (A, dim):-1:1;
+  B = A(idx{:});
 
 endfunction
 
--- a/scripts/general/fliplr.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/fliplr.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} fliplr (@var{x})
+## @deftypefn {} {@var{B} =} fliplr (@var{A})
 ## Flip array left to right.
 ##
-## Return a copy of @var{x} with the order of the columns reversed.  In other
-## words, @var{x} is flipped left-to-right about a vertical axis.  For example:
+## Return a copy of @var{A} with the order of the columns reversed.  In other
+## words, @var{A} is flipped left-to-right about a vertical axis.  For example:
 ##
 ## @example
 ## @group
@@ -41,13 +41,13 @@
 ## @seealso{flipud, flip, rot90, rotdim}
 ## @end deftypefn
 
-function y = fliplr (x)
+function B = fliplr (A)
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  y = flip (x, 2);
+  B = flip (A, 2);
 
 endfunction
 
--- a/scripts/general/flipud.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/flipud.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} flipud (@var{x})
+## @deftypefn {} {@var{B} =} flipud (@var{A})
 ## Flip array upside down.
 ##
-## Return a copy of @var{x} with the order of the rows reversed.  In other
-## words, @var{x} is flipped upside-down about a horizontal axis.  For example:
+## Return a copy of @var{A} with the order of the rows reversed.  In other
+## words, @var{A} is flipped upside-down about a horizontal axis.  For example:
 ##
 ## @example
 ## @group
@@ -41,12 +41,12 @@
 ## @seealso{fliplr, flip, rot90, rotdim}
 ## @end deftypefn
 
-function y = flipud (x)
+function B = flipud (A)
 
   if (nargin < 1)
     print_usage ();
   endif
-  y = flip (x, 1);
+  B = flip (A, 1);
 
 endfunction
 
--- a/scripts/general/idivide.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/idivide.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} idivide (@var{x}, @var{y}, @var{op})
+## @deftypefn {} {@var{C} =} idivide (@var{A}, @var{B}, @var{op})
 ## Integer division with different rounding rules.
 ##
-## The standard behavior of integer division such as @code{@var{a} ./ @var{b}}
+## The standard behavior of integer division such as @code{@var{A} ./ @var{B}}
 ## is to round the result to the nearest integer.  This is not always the
 ## desired behavior and @code{idivide} permits integer element-by-element
 ## division to be performed with different treatment for the fractional
@@ -36,19 +36,19 @@
 ##
 ## @table @asis
 ## @item @qcode{"fix"}
-## Calculate @code{@var{a} ./ @var{b}} with the fractional part rounded
+## Calculate @code{@var{A} ./ @var{B}} with the fractional part rounded
 ## towards zero.
 ##
 ## @item @qcode{"round"}
-## Calculate @code{@var{a} ./ @var{b}} with the fractional part rounded
+## Calculate @code{@var{A} ./ @var{B}} with the fractional part rounded
 ## towards the nearest integer.
 ##
 ## @item @qcode{"floor"}
-## Calculate @code{@var{a} ./ @var{b}} with the fractional part rounded
+## Calculate @code{@var{A} ./ @var{B}} with the fractional part rounded
 ## towards negative infinity.
 ##
 ## @item @qcode{"ceil"}
-## Calculate @code{@var{a} ./ @var{b}} with the fractional part rounded
+## Calculate @code{@var{A} ./ @var{B}} with the fractional part rounded
 ## towards positive infinity.
 ## @end table
 ##
@@ -69,10 +69,10 @@
 ## @end group
 ## @end example
 ##
-## @seealso{ldivide, rdivide}
+## @seealso{ceil, floor, fix, round, ldivide, rdivide}
 ## @end deftypefn
 
-function z = idivide (x, y, op)
+function C = idivide (A, B, op)
 
   if (nargin < 2)
     print_usage ();
@@ -84,74 +84,74 @@
     op = tolower (op);
   endif
 
-  if (! isinteger (x) && ! isinteger (y))
-    error ("idivide: at least one input (X or Y) must be an integer type");
-  elseif (isinteger (x) && isinteger (y) && ! strcmp (class (x), class (y)))
-    error ("idivide: integer type of X (%s) must match integer type of Y (%s)",
-           class (x), class (y));
+  if (! isinteger (A) && ! isinteger (B))
+    error ("idivide: at least one input (A or B) must be an integer type");
+  elseif (isinteger (A) && isinteger (B) && ! strcmp (class (A), class (B)))
+    error ("idivide: integer type of A (%s) must match integer type of B (%s)",
+           class (A), class (B));
   endif
 
-  z = x ./ y;
+  C = A ./ B;
   if (strcmp (op, "fix"))
-    ## The following is an optimized version of `z -= (z .* y > x) .* sign (y)`.
-    if (isscalar (y))
-      if (y > 0)
-        z -= (z * y > x);
+    ## The following is an optimized version of `C -= (C .* B > A) .* sign (B)`.
+    if (isscalar (B))
+      if (B > 0)
+        C -= (C * B > A);
       else
-        z += (z * y > x);
+        C += (C * B > A);
       endif
     else
-      y_sel = (y > 0);
-      if (isscalar (x))
-        z(y_sel) -= (z(y_sel) .* y(y_sel) > x);
+      y_sel = (B > 0);
+      if (isscalar (A))
+        C(y_sel) -= (C(y_sel) .* B(y_sel) > A);
         y_sel = ! y_sel;
-        z(y_sel) += (z(y_sel) .* y(y_sel) > x);
+        C(y_sel) += (C(y_sel) .* B(y_sel) > A);
       else
-        z(y_sel) -= (z(y_sel) .* y(y_sel) > x(y_sel));
+        C(y_sel) -= (C(y_sel) .* B(y_sel) > A(y_sel));
         y_sel = ! y_sel;
-        z(y_sel) += (z(y_sel) .* y(y_sel) > x(y_sel));
+        C(y_sel) += (C(y_sel) .* B(y_sel) > A(y_sel));
       endif
     endif
   elseif (strcmp (op, "round"))
     return;
   elseif (strcmp (op, "floor"))
-    ## The following is an optimized version of `z -= (z .* abs (y) > sign (y) .* x)`.
-    if (isscalar (y))
-      if (y > 0)
-        z -= (z * y > x);
+    ## The following is an optimized version of `C -= (C .* abs (B) > sign (B) .* A)`.
+    if (isscalar (B))
+      if (B > 0)
+        C -= (C * B > A);
       else
-        z -= (z * y < x);
+        C -= (C * B < A);
       endif
     else
-      y_sel = (y > 0);
-      if (isscalar (x))
-        z(y_sel) -= (z(y_sel) .* y(y_sel) > x);
+      y_sel = (B > 0);
+      if (isscalar (A))
+        C(y_sel) -= (C(y_sel) .* B(y_sel) > A);
         y_sel = ! y_sel;
-        z(y_sel) -= (z(y_sel) .* y(y_sel) < x);
+        C(y_sel) -= (C(y_sel) .* B(y_sel) < A);
       else
-        z(y_sel) -= (z(y_sel) .* y(y_sel) > x(y_sel));
+        C(y_sel) -= (C(y_sel) .* B(y_sel) > A(y_sel));
         y_sel = ! y_sel;
-        z(y_sel) -= (z(y_sel) .* y(y_sel) < x(y_sel));
+        C(y_sel) -= (C(y_sel) .* B(y_sel) < A(y_sel));
       endif
     endif
   elseif (strcmp (op, "ceil"))
-    ## The following is an optimized version of `z += (z .* abs (y) < sign (y) .* x)`.
-    if (isscalar (y))
-      if (y > 0)
-        z += (z * y < x);
+    ## The following is an optimized version of `C += (C .* abs (B) < sign (B) .* A)`.
+    if (isscalar (B))
+      if (B > 0)
+        C += (C * B < A);
       else
-        z += (z * y > x);
+        C += (C * B > A);
       endif
     else
-      y_sel = (y > 0);
-      if (isscalar (x))
-        z(y_sel) += (z(y_sel) .* y(y_sel) < x);
+      y_sel = (B > 0);
+      if (isscalar (A))
+        C(y_sel) += (C(y_sel) .* B(y_sel) < A);
         y_sel = ! y_sel;
-        z(y_sel) += (z(y_sel) .* y(y_sel) > x);
+        C(y_sel) += (C(y_sel) .* B(y_sel) > A);
       else
-        z(y_sel) += (z(y_sel) .* y(y_sel) < x(y_sel));
+        C(y_sel) += (C(y_sel) .* B(y_sel) < A(y_sel));
         y_sel = ! y_sel;
-        z(y_sel) += (z(y_sel) .* y(y_sel) > x(y_sel));
+        C(y_sel) += (C(y_sel) .* B(y_sel) > A(y_sel));
       endif
     endif
   else
@@ -201,5 +201,5 @@
 %!error idivide (uint8 (1), 2, 3)
 %!error <at least one input> idivide (1, 2)
 %!error <at least one input> idivide ({1}, 2)
-%!error <X \(int8\) must match.* Y \(uint8\)> idivide (int8 (1), uint8 (2))
+%!error <A \(int8\) must match.* B \(uint8\)> idivide (int8 (1), uint8 (2))
 %!error <unrecognized rounding type "foo"> idivide (int8 (1), 2, "foo")
--- a/scripts/general/int2str.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/int2str.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} int2str (@var{n})
+## @deftypefn {} {@var{str} =} int2str (@var{n})
 ## Convert an integer (or array of integers) to a string (or a character
 ## array).
 ##
@@ -58,7 +58,7 @@
 ## @seealso{sprintf, num2str, mat2str}
 ## @end deftypefn
 
-function retval = int2str (n)
+function str = int2str (n)
 
   if (nargin < 1)
     print_usage ();
@@ -67,10 +67,10 @@
   endif
 
   if (ischar (n))
-    retval = n;
+    str = n;
     return;
   elseif (isempty (n))
-    retval = "";
+    str = "";
     return;
   endif
 
@@ -96,7 +96,7 @@
   n  = permute (n, [2, 3:nd, 1]);
   fmt = [repmat(fmt, 1, nc), "\n"];
   strtmp = sprintf (fmt, n);
-  retval = strtrim (char (ostrsplit (strtmp, "\n", true)));
+  str = strtrim (char (ostrsplit (strtmp, "\n", true)));
 
 endfunction
 
--- a/scripts/general/interpft.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/interpft.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} interpft (@var{x}, @var{n})
-## @deftypefnx {} {} interpft (@var{x}, @var{n}, @var{dim})
+## @deftypefn  {} {@var{y} =} interpft (@var{x}, @var{n})
+## @deftypefnx {} {@var{y} =} interpft (@var{x}, @var{n}, @var{dim})
 ##
 ## Fourier interpolation.
 ##
@@ -41,7 +41,7 @@
 ## @seealso{interp1}
 ## @end deftypefn
 
-function z = interpft (x, n, dim)
+function y = interpft (x, n, dim)
 
   if (nargin < 2)
     print_usage ();
@@ -70,36 +70,36 @@
   m = rows (x);
 
   inc = ceil (m/n);
-  y = fft (x) / m;
+  xfft = fft (x) / m;
   k = ceil (m / 2);
   sz = size (x);
   sz(1) = n * inc - m;
 
   idx = repmat ({':'}, nd, 1);
   idx{1} = 1:k;
-  z = cat (1, y(idx{:}), zeros (sz));
+  y = cat (1, xfft(idx{:}), zeros (sz));
   idx{1} = k+1:m;
-  z = cat (1, z, y(idx{:}));
+  y = cat (1, y, xfft(idx{:}));
 
   ## When m is an even number of rows, the FFT has a single Nyquist bin.
   ## If zero-padded above, distribute the value of the Nyquist bin evenly
   ## between the new corresponding positive and negative frequency bins.
   if (sz(1) > 0 && k == m/2)
     idx{1} = n * inc - k + 1;
-    tmp = z(idx{:}) / 2;
-    z(idx{:}) = tmp;
+    tmp = y(idx{:}) / 2;
+    y(idx{:}) = tmp;
     idx{1} = k + 1;
-    z(idx{:}) = tmp;
+    y(idx{:}) = tmp;
   endif
 
-  z = n * ifft (z);
+  y = n * ifft (y);
 
   if (inc != 1)
     sz(1) = n;
-    z = inc * reshape (z(1:inc:end), sz);
+    y = inc * reshape (y(1:inc:end), sz);
   endif
 
-  z = ipermute (z, perm);
+  y = ipermute (y, perm);
 
 endfunction
 
--- a/scripts/general/logspace.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/logspace.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} logspace (@var{a}, @var{b})
-## @deftypefnx {} {} logspace (@var{a}, @var{b}, @var{n})
-## @deftypefnx {} {} logspace (@var{a}, pi, @var{n})
+## @deftypefn  {} {@var{y} =} logspace (@var{a}, @var{b})
+## @deftypefnx {} {@var{y} =} logspace (@var{a}, @var{b}, @var{n})
+## @deftypefnx {} {@var{y} =} logspace (@var{a}, pi, @var{n})
 ## Return a row vector with @var{n} elements logarithmically spaced from
 ## @tex
 ## $10^{a}$ to $10^{b}$.
@@ -72,7 +72,7 @@
 ## @seealso{linspace}
 ## @end deftypefn
 
-function retval = logspace (a, b, n = 50)
+function y = logspace (a, b, n = 50)
 
   if (nargin < 2)
     print_usage ();
@@ -88,7 +88,7 @@
     b = log10 (pi);
   endif
 
-  retval = 10 .^ (linspace (a, b, npoints));
+  y = 10 .^ (linspace (a, b, npoints));
 
 endfunction
 
--- a/scripts/general/num2str.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/num2str.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} num2str (@var{x})
-## @deftypefnx {} {} num2str (@var{x}, @var{precision})
-## @deftypefnx {} {} num2str (@var{x}, @var{format})
+## @deftypefn  {} {@var{str} =} num2str (@var{x})
+## @deftypefnx {} {@var{str} =} num2str (@var{x}, @var{precision})
+## @deftypefnx {} {@var{str} =} num2str (@var{x}, @var{format})
 ## Convert a number (or array) to a string (or a character array).
 ##
 ## The optional second argument may either give the number of significant
@@ -78,7 +78,7 @@
 ## @seealso{sprintf, int2str, mat2str}
 ## @end deftypefn
 
-function retval = num2str (x, arg)
+function str = num2str (x, arg)
 
   if (nargin < 1)
     print_usage ();
@@ -87,9 +87,9 @@
   endif
 
   if (ischar (x))
-    retval = x;
+    str = x;
   elseif (isempty (x))
-    retval = "";
+    str = "";
   elseif (isreal (x))
     if (nargin == 2)
       if (ischar (arg))
@@ -143,7 +143,7 @@
       fmt = [deblank(repmat (fmt, 1, nc)), "\n"];
     endif
     strtmp = sprintf (fmt, x);
-    retval = strtrim (char (ostrsplit (strtmp, "\n", true)));
+    str = strtrim (char (ostrsplit (strtmp, "\n", true)));
   else   # Complex matrix input
     if (nargin == 2)
       if (ischar (arg))
@@ -195,7 +195,7 @@
     tmp = regexprep (tmp, " +i\n", "i\n");
     tmp = regexprep (tmp, "( +)i", "i$1");
 
-    retval = strtrim (char (ostrsplit (tmp(1:end-1), "\n")));
+    str = strtrim (char (ostrsplit (tmp(1:end-1), "\n")));
   endif
 
 endfunction
--- a/scripts/general/polyarea.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/polyarea.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} polyarea (@var{x}, @var{y})
-## @deftypefnx {} {} polyarea (@var{x}, @var{y}, @var{dim})
+## @deftypefn  {} {@var{a} =} polyarea (@var{x}, @var{y})
+## @deftypefnx {} {@var{a} =} polyarea (@var{x}, @var{y}, @var{dim})
 ##
 ## Determine area of a polygon by triangle method.
 ##
--- a/scripts/general/postpad.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/postpad.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,25 +24,25 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} postpad (@var{x}, @var{l})
-## @deftypefnx {} {} postpad (@var{x}, @var{l}, @var{c})
-## @deftypefnx {} {} postpad (@var{x}, @var{l}, @var{c}, @var{dim})
-## Append the scalar value @var{c} to the vector @var{x} until it is of length
+## @deftypefn  {} {@var{B} =} postpad (@var{A}, @var{l})
+## @deftypefnx {} {@var{B} =} postpad (@var{A}, @var{l}, @var{c})
+## @deftypefnx {} {@var{B} =} postpad (@var{A}, @var{l}, @var{c}, @var{dim})
+## Append the scalar value @var{c} to the vector @var{A} until it is of length
 ## @var{l}.  If @var{c} is not given, a value of 0 is used.
 ##
-## If @code{length (@var{x}) > @var{l}}, elements from the end of @var{x} are
+## If @code{length (@var{A}) > @var{l}}, elements from the end of @var{A} are
 ## removed until a vector of length @var{l} is obtained.
 ##
-## If @var{x} is a matrix, elements are appended or removed from each row.
+## If @var{A} is a matrix, elements are appended or removed from each row.
 ##
 ## If the optional argument @var{dim} is given, operate along this dimension.
 ##
-## If @var{dim} is larger than the dimensions of @var{x}, the result will have
+## If @var{dim} is larger than the dimensions of @var{A}, the result will have
 ## @var{dim} dimensions.
 ## @seealso{prepad, cat, resize}
 ## @end deftypefn
 
-function y = postpad (x, l, c, dim)
+function B = postpad (A, l, c, dim)
 
   if (nargin < 2)
     print_usage ();
@@ -56,8 +56,8 @@
     endif
   endif
 
-  nd = ndims (x);
-  sz = size (x);
+  nd = ndims (A);
+  sz = size (A);
   if (nargin < 4)
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
@@ -84,14 +84,14 @@
     ##    ml = max (numel (v1), numel (v2));
     ##    v1 = postpad (v1, ml);
     ##    v2 = postpad (v2, ml);
-    y = x;
+    B = A;
   elseif (d >= l)
     idx = repmat ({':'}, nd, 1);
     idx{dim} = 1:l;
-    y = x(idx{:});
+    B = A(idx{:});
   else
     sz(dim) = l - d;
-    y = cat (dim, x, c(ones (sz)));
+    B = cat (dim, A, c(ones (sz)));
   endif
 
 endfunction
--- a/scripts/general/prepad.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/prepad.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,25 +24,25 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} prepad (@var{x}, @var{l})
-## @deftypefnx {} {} prepad (@var{x}, @var{l}, @var{c})
-## @deftypefnx {} {} prepad (@var{x}, @var{l}, @var{c}, @var{dim})
-## Prepend the scalar value @var{c} to the vector @var{x} until it is of length
+## @deftypefn  {} {@var{B} =} prepad (@var{A}, @var{l})
+## @deftypefnx {} {@var{B} =} prepad (@var{A}, @var{l}, @var{c})
+## @deftypefnx {} {@var{B} =} prepad (@var{A}, @var{l}, @var{c}, @var{dim})
+## Prepend the scalar value @var{c} to the vector @var{A} until it is of length
 ## @var{l}.  If @var{c} is not given, a value of 0 is used.
 ##
-## If @code{length (@var{x}) > @var{l}}, elements from the beginning of @var{x}
+## If @code{length (@var{A}) > @var{l}}, elements from the beginning of @var{A}
 ## are removed until a vector of length @var{l} is obtained.
 ##
-## If @var{x} is a matrix, elements are prepended or removed from each row.
+## If @var{A} is a matrix, elements are prepended or removed from each row.
 ##
 ## If the optional argument @var{dim} is given, operate along this dimension.
 ##
-## If @var{dim} is larger than the dimensions of @var{x}, the result will have
+## If @var{dim} is larger than the dimensions of @var{A}, the result will have
 ## @var{dim} dimensions.
 ## @seealso{postpad, cat, resize}
 ## @end deftypefn
 
-function y = prepad (x, l, c, dim)
+function B = prepad (A, l, c, dim)
 
   if (nargin < 2)
     print_usage ();
@@ -56,8 +56,8 @@
     endif
   endif
 
-  nd = ndims (x);
-  sz = size (x);
+  nd = ndims (A);
+  sz = size (A);
   if (nargin < 4)
     ## Find the first non-singleton dimension.
     (dim = find (sz > 1, 1)) || (dim = 1);
@@ -84,14 +84,14 @@
     ##    ml = max (numel (v1), numel (v2));
     ##    v1 = prepad (v1, ml);
     ##    v2 = prepad (v2, ml);
-    y = x;
+    B = A;
   elseif (d >= l)
     idx = repmat ({':'}, nd, 1);
     idx{dim} = d-l+1:d;
-    y = x(idx{:});
+    B = A(idx{:});
   else
     sz(dim) = l - d;
-    y = cat (dim, c(ones (sz)), x);
+    B = cat (dim, c(ones (sz)), A);
   endif
 
 endfunction
--- a/scripts/general/randi.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/randi.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} randi (@var{imax})
-## @deftypefnx {} {} randi (@var{imax}, @var{n})
-## @deftypefnx {} {} randi (@var{imax}, @var{m}, @var{n}, @dots{})
-## @deftypefnx {} {} randi ([@var{imin} @var{imax}], @dots{})
-## @deftypefnx {} {} randi (@dots{}, "@var{class}")
+## @deftypefn  {} {@var{R} =} randi (@var{imax})
+## @deftypefnx {} {@var{R} =} randi (@var{imax}, @var{n})
+## @deftypefnx {} {@var{R} =} randi (@var{imax}, @var{m}, @var{n}, @dots{})
+## @deftypefnx {} {@var{R} =} randi ([@var{imin} @var{imax}], @dots{})
+## @deftypefnx {} {@var{R} =} randi (@dots{}, "@var{class}")
 ## Return random integers in the range 1:@var{imax}.
 ##
 ## Additional arguments determine the shape of the return matrix.  When no
@@ -37,7 +37,7 @@
 ## is returned.  Two or more arguments will return a multi-dimensional matrix
 ## @w{(@var{m} x @var{n} x @dots{})}.
 ##
-## The integer range may optionally be described by a two element matrix with a
+## The integer range may optionally be described by a two-element matrix with a
 ## lower and upper bound in which case the returned integers will be on the
 ## interval @w{[@var{imin}, @var{imax}]}.
 ##
@@ -56,10 +56,10 @@
 ## returned by the @code{flintmax} function.  For IEEE floating point numbers
 ## this value is @w{@math{2^{53} - 1}}.
 ##
-## @seealso{rand}
+## @seealso{rand, randn}
 ## @end deftypefn
 
-function ri = randi (bounds, varargin)
+function R = randi (bounds, varargin)
 
   if (nargin < 1)
     print_usage ();
@@ -121,7 +121,7 @@
     r_prim = r_prim(r_prim < K*rng);
   until (numel (r_prim) >= N)           # should practically always be true
 
-  ri = imin + floor (reshape (r_prim(1:N), varargin{:}) / K);
+  R = imin + floor (reshape (r_prim(1:N), varargin{:}) / K);
 
   if (! strcmp (rclass, "double"))
     if (strfind (rclass, "int"))
@@ -141,7 +141,7 @@
                 " Values might be truncated to requested type."]);
     endif
 
-    ri = cast (ri, rclass);
+    R = cast (R, rclass);
   endif
 
 endfunction
--- a/scripts/general/repmat.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/repmat.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} repmat (@var{A}, @var{m})
-## @deftypefnx {} {} repmat (@var{A}, @var{m}, @var{n})
-## @deftypefnx {} {} repmat (@var{A}, @var{m}, @var{n}, @var{p} @dots{})
-## @deftypefnx {} {} repmat (@var{A}, [@var{m} @var{n}])
-## @deftypefnx {} {} repmat (@var{A}, [@var{m} @var{n} @var{p} @dots{}])
+## @deftypefn  {} {@var{B} =} repmat (@var{A}, @var{m})
+## @deftypefnx {} {@var{B} =} repmat (@var{A}, @var{m}, @var{n})
+## @deftypefnx {} {@var{B} =} repmat (@var{A}, @var{m}, @var{n}, @var{p} @dots{})
+## @deftypefnx {} {@var{B} =} repmat (@var{A}, [@var{m} @var{n}])
+## @deftypefnx {} {@var{B} =} repmat (@var{A}, [@var{m} @var{n} @var{p} @dots{}])
 ## Repeat matrix or N-D array.
 ##
 ## Form a block matrix of size @var{m} by @var{n}, with a copy of matrix
@@ -42,7 +42,7 @@
 ## @seealso{bsxfun, kron, repelems}
 ## @end deftypefn
 
-function x = repmat (A, m, varargin)
+function B = repmat (A, m, varargin)
 
   if (nargin < 2)
     print_usage ();
@@ -107,21 +107,21 @@
   if (numel (A) == 1)
     ## optimize the scalar fill case.
     if (any (idx == 0))
-      x = resize (A, idx);
+      B = resize (A, idx);
     else
-      x(1:prod (idx)) = A;
-      x = reshape (x, idx);
+      B(1:prod (idx)) = A;
+      B = reshape (B, idx);
     endif
   elseif (ndims (A) == 2 && length (idx) < 3)
     if (issparse (A))
-      x = kron (ones (idx), A);
+      B = kron (ones (idx), A);
     else
       ## indexing is now faster, so we use it rather than kron.
       m = rows (A); n = columns (A);
       p = idx(1); q = idx(2);
-      x = reshape (A, m, 1, n, 1);
-      x = x(:, ones (1, p), :, ones (1, q));
-      x = reshape (x, m*p, n*q);
+      B = reshape (A, m, 1, n, 1);
+      B = B(:, ones (1, p), :, ones (1, q));
+      B = reshape (B, m*p, n*q);
     endif
   else
     aidx = size (A);
@@ -138,7 +138,7 @@
     ## add singleton dims
     aaidx(2,:) = 1;
     A = reshape (A, aaidx(:));
-    x = reshape (A (cidx{:}), idx .* aidx);
+    B = reshape (A (cidx{:}), idx .* aidx);
   endif
 
 endfunction
--- a/scripts/general/rng.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/rng.m	Wed Mar 30 20:40:27 2022 -0700
@@ -75,7 +75,7 @@
 ## @seealso{rand, randn}
 ## @end deftypefn
 
-function retval = rng (varargin)
+function s = rng (varargin)
 
   if (nargin > 2)
     print_usage ();
@@ -93,12 +93,12 @@
   ## Type is the generator name.
   ## Seed is the initial seed value.
   ## State is a structure describing internal state of the generator.
-  s = struct ("Type", "twister",
-              "Seed", "Not applicable",
-              "State", {{rand("state"), randn("state")}});
+  srng = struct ("Type", "twister",
+                 "Seed", "Not applicable",
+                 "State", {{rand("state"), randn("state")}});
 
   if (nargin == 0)
-    retval = s;
+    s = srng;
     return;
   endif
 
@@ -135,7 +135,7 @@
 
   ## Set the type of random number generator and seed it
   if (isempty (generator))
-    generator = s.Type;
+    generator = srng.Type;
   endif
   switch (generator)
     case "twister"
@@ -158,7 +158,7 @@
   endswitch
 
   if (nargout > 0)
-    retval = s;
+    s = srng;
   endif
 
 endfunction
--- a/scripts/general/rot90.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/rot90.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} rot90 (@var{A})
-## @deftypefnx {} {} rot90 (@var{A}, @var{k})
+## @deftypefn  {} {@var{B} =} rot90 (@var{A})
+## @deftypefnx {} {@var{B} =} rot90 (@var{A}, @var{k})
 ## Rotate array by 90 degree increments.
 ##
 ## Return a copy of @var{A} with the elements rotated counterclockwise in
--- a/scripts/general/rotdim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/rotdim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} rotdim (@var{x})
-## @deftypefnx {} {} rotdim (@var{x}, @var{n})
-## @deftypefnx {} {} rotdim (@var{x}, @var{n}, @var{plane})
-## Return a copy of @var{x} with the elements rotated counterclockwise in
+## @deftypefn  {} {@var{B} =} rotdim (@var{A})
+## @deftypefnx {} {@var{B} =} rotdim (@var{A}, @var{n})
+## @deftypefnx {} {@var{B} =} rotdim (@var{A}, @var{n}, @var{plane})
+## Return a copy of @var{A} with the elements rotated counterclockwise in
 ## 90-degree increments.
 ##
 ## The second argument @var{n} is optional, and specifies how many 90-degree
@@ -63,7 +63,7 @@
 ## @seealso{rot90, fliplr, flipud, flip}
 ## @end deftypefn
 
-function y = rotdim (x, n, plane)
+function B = rotdim (A, n, plane)
 
   if (nargin < 1)
     print_usage ();
@@ -77,8 +77,8 @@
     n = 1;
   endif
 
-  nd = ndims (x);
-  sz = size (x);
+  nd = ndims (A);
+  sz = size (A);
   if (nargin < 3)
     if (nd > 2)
       ## Find the first two non-singleton dimension.
@@ -105,7 +105,7 @@
     if (! (isvector (plane) && length (plane) == 2
            && all (plane == fix (plane)) && all (plane > 0)
            && all (plane < (nd + 1)) && plane(1) != plane(2)))
-      error ("rotdim: PLANE must be a 2 element integer vector defining a valid PLANE");
+      error ("rotdim: PLANE must be a 2-element integer vector defining a valid plane");
     endif
   endif
 
@@ -114,21 +114,19 @@
     n += 4;
   endif
   if (n == 0)
-    y = x;
+    B = A;
   elseif (n == 2)
-    y = flip (flip (x, plane(1)), plane(2));
+    B = flip (flip (A, plane(1)), plane(2));
   elseif (n == 1 || n == 3)
     perm = 1:nd;
     perm(plane(1)) = plane(2);
     perm(plane(2)) = plane(1);
-    y = permute (x, perm);
+    B = permute (A, perm);
     if (n == 1)
-      y = flip (y, min (plane));
+      B = flip (B, min (plane));
     else
-      y = flip (y, max (plane));
+      B = flip (B, max (plane));
     endif
-  else
-    error ("rotdim: internal error!");
   endif
 
 endfunction
--- a/scripts/general/structfun.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/structfun.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} structfun (@var{func}, @var{S})
-## @deftypefnx {} {[@var{A}, @dots{}] =} structfun (@dots{})
-## @deftypefnx {} {} structfun (@dots{}, "ErrorHandler", @var{errfunc})
-## @deftypefnx {} {} structfun (@dots{}, "UniformOutput", @var{val})
+## @deftypefn  {} {@var{A} =} structfun (@var{func}, @var{S})
+## @deftypefnx {} {@var{A} =} structfun (@dots{}, "ErrorHandler", @var{errfunc})
+## @deftypefnx {} {@var{A} =} structfun (@dots{}, "UniformOutput", @var{val})
+## @deftypefnx {} {[@var{A}, @var{B}, @dots{}] =} structfun (@dots{})
 ##
 ## Evaluate the function named @var{name} on the fields of the structure
 ## @var{S}.  The fields of @var{S} are passed to the function @var{func}
--- a/scripts/general/triplequad.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/general/triplequad.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb})
-## @deftypefnx {} {} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb}, @var{tol})
-## @deftypefnx {} {} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb}, @var{tol}, @var{quadf})
-## @deftypefnx {} {} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb}, @var{tol}, @var{quadf}, @dots{})
+## @deftypefn  {} {@var{q} =} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb})
+## @deftypefnx {} {@var{q} =} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb}, @var{tol})
+## @deftypefnx {} {@var{q} =} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb}, @var{tol}, @var{quadf})
+## @deftypefnx {} {@var{q} =} triplequad (@var{f}, @var{xa}, @var{xb}, @var{ya}, @var{yb}, @var{za}, @var{zb}, @var{tol}, @var{quadf}, @dots{})
 ## Numerically evaluate the triple integral of @var{f}.
 ##
 ## @var{f} is a function handle, inline function, or string containing the name
--- a/scripts/gui/uibuttongroup.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/uibuttongroup.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,12 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{hui} =} uibuttongroup (@var{property}, @var{value}, @dots{})
+## @deftypefn  {} {@var{hui} =} uibuttongroup ()
+## @deftypefnx {} {@var{hui} =} uibuttongroup (@var{property}, @var{value}, @dots{})
+## @deftypefnx {} {@var{hui} =} uibuttongroup (@var{parent})
 ## @deftypefnx {} {@var{hui} =} uibuttongroup (@var{parent}, @var{property}, @var{value}, @dots{})
+## @c FIXME: 3rd form is not documented by Matlab nor implemented in Octave.
+## @c        Should it be removed?  (1/9/2022).
 ## @deftypefnx {} {} uibuttongroup (@var{h})
 ##
 ## Create a uibuttongroup object and return a handle to it.
--- a/scripts/gui/uicontrol.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/uicontrol.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{hui} =} uicontrol (@var{property}, @var{value}, @dots{})
+## @deftypefn  {} {@var{hui} =} uicontrol ()
+## @deftypefnx {} {@var{hui} =} uicontrol (@var{property}, @var{value}, @dots{})
+## @deftypefnx {} {@var{hui} =} uicontrol (@var{parent})
 ## @deftypefnx {} {@var{hui} =} uicontrol (@var{parent}, @var{property}, @var{value}, @dots{})
 ## @deftypefnx {} {} uicontrol (@var{h})
 ##
--- a/scripts/gui/uipanel.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/uipanel.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} uipanel (@var{property}, @var{value}, @dots{})
-## @deftypefnx {} {} uipanel (@var{parent}, @var{property}, @var{value}, @dots{})
-## @deftypefnx {} {@var{hui} =} uipanel (@dots{})
+## @deftypefn  {} {@var{hui} =} uipanel ()
+## @deftypefnx {} {@var{hui} =} uipanel (@var{property}, @var{value}, @dots{})
+## @deftypefnx {} {@var{hui} =} uipanel (@var{parent})
+## @deftypefnx {} {@var{hui} =} uipanel (@var{parent}, @var{property}, @var{value}, @dots{})
 ##
 ## Create a uipanel object.
 ##
--- a/scripts/gui/uipushtool.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/uipushtool.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} uipushtool (@var{property}, @var{value}, @dots{})
+## @deftypefn  {} {} uipushtool ()
+## @deftypefnx {} {} uipushtool (@var{property}, @var{value}, @dots{})
+## @deftypefnx {} {} uipushtool (@var{parent})
 ## @deftypefnx {} {} uipushtool (@var{parent}, @var{property}, @var{value}, @dots{})
-## @deftypefnx {} {@var{hui} =} uipushtool (@dots{})
 ##
 ## Create a uipushtool object.
 ##
--- a/scripts/gui/uitoggletool.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/uitoggletool.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} uitoggletool (@var{property}, @var{value}, @dots{})
-## @deftypefnx {} {} uitoggletool (@var{parent}, @var{property}, @var{value}, @dots{})
-## @deftypefnx {} {@var{hui} =} uitoggletool (@dots{})
+## @deftypefn  {} {@var{hui} =} uitoggletool ()
+## @deftypefnx {} {@var{hui} =} uitoggletool (@var{property}, @var{value}, @dots{})
+## @deftypefnx {} {@var{hui} =} uitoggletool (@var{parent})
+## @deftypefnx {} {@var{hui} =} uitoggletool (@var{parent}, @var{property}, @var{value}, @dots{})
 ##
 ## Create a uitoggletool object.
 ##
--- a/scripts/gui/uitoolbar.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/uitoolbar.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} uitoolbar (@var{property}, @var{value}, @dots{})
-## @deftypefnx {} {} uitoolbar (@var{parent}, @var{property}, @var{value}, @dots{})
-## @deftypefnx {} {@var{hui} =} uitoolbar (@dots{})
+## @deftypefn  {} {@var{hui} =} uitoolbar ()
+## @deftypefnx {} {@var{hui} =} uitoolbar (@var{property}, @var{value}, @dots{})
+## @deftypefnx {} {@var{hui} =} uitoolbar (@var{parent})
+## @deftypefnx {} {@var{hui} =} uitoolbar (@var{parent}, @var{property}, @var{value}, @dots{})
 ##
 ## Create a uitoolbar object.  A uitoolbar displays uitoggletool and uipushtool
 ## buttons.
--- a/scripts/gui/waitforbuttonpress.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/gui/waitforbuttonpress.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} waitforbuttonpress ()
-## @deftypefnx {} {@var{b} =} waitforbuttonpress ()
+## @deftypefn {} {@var{b} =} waitforbuttonpress ()
 ## Wait for mouse click or key press over the current figure window.
 ##
 ## The return value of @var{b} is 0 if a mouse button was pressed or 1 if a
--- a/scripts/help/help.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/help/help.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,6 +28,7 @@
 ## @deftypefnx {} {} help --list
 ## @deftypefnx {} {} help .
 ## @deftypefnx {} {} help
+## @deftypefnx {} {@var{help_text} =} help (@dots{})
 ## Display the help text for @var{name}.
 ##
 ## For example, the command @kbd{help help} prints a short message describing
--- a/scripts/help/private/__additional_help_message__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/help/private/__additional_help_message__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __additional_help_message__ ()
+## @deftypefn {} {@var{msg} =} __additional_help_message__ ()
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/image/hsv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/image/hsv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} hsv (@var{n})
+## @deftypefn  {} {@var{map} =} hsv ()
+## @deftypefnx {} {@var{map} =} hsv (@var{n})
 ## Create color colormap.  This colormap begins with red, changes through
 ## yellow, green, cyan, blue, and magenta, before returning to red.
 ##
--- a/scripts/image/im2double.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/image/im2double.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,20 +24,19 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} im2double (@var{img})
-## @deftypefnx {} {} im2double (@var{img}, "indexed")
+## @deftypefn  {} {@var{dimg} =} im2double (@var{img})
+## @deftypefnx {} {@var{dimg} =} im2double (@var{img}, "indexed")
 ## Convert image to double precision.
 ##
-## The conversion of @var{img} to double precision, is dependent
-## on the type of input image.  The following input classes are
-## supported:
+## The conversion of @var{img} to double precision, is dependent on the type of
+## input image.  The following input classes are supported:
 ##
 ## @table @samp
 ## @item uint8, uint16, and int16
 ## The range of values from the class is scaled to the interval [0 1].
 ##
 ## @item logical
-## True and false values are assigned a value of 0 and 1 respectively.
+## True and false values are assigned a value of 1 and 0 respectively.
 ##
 ## @item single
 ## Values are cast to double.
@@ -47,15 +46,15 @@
 ##
 ## @end table
 ##
-## If @var{img} is an indexed image, then the second argument should be
-## the string @qcode{"indexed"}.  If so, then @var{img} must either be
-## of floating point class, or unsigned integer class and it will simply
-## be cast to double.  If it is an integer class, a +1 offset is applied.
+## If @var{img} is an indexed image, then the second argument should be the
+## string @qcode{"indexed"}.  If so, then @var{img} must either be of floating
+## point class, or unsigned integer class and it will simply be cast to double.
+## If it is an integer class, an offset of +1 is applied.
 ##
 ## @seealso{double}
 ## @end deftypefn
 
-function img = im2double (img, im_type)
+function dimg = im2double (img, im_type)
 
   if (nargin < 1)
     print_usage ();
@@ -64,12 +63,12 @@
   if (nargin == 1)
     ## "normal" (non-indexed) images
     switch (class (img))
-      case "uint8",   img = double (img) / 255;
-      case "uint16",  img = double (img) / 65535;
-      case "int16",   img = (double (img) + 32768) / 65535;
-      case "single",  img = double (img);
-      case "logical", img = double (img);
-      case "double",  # do nothing
+      case "uint8",   dimg = double (img) / 255;
+      case "uint16",  dimg = double (img) / 65535;
+      case "int16",   dimg = (double (img) + 32768) / 65535;
+      case "single",  dimg = double (img);
+      case "logical", dimg = double (img);
+      case "double",  dimg = img;
       otherwise, error ('im2double: IMG is of unsupported class "%s"', class (img));
     endswitch
   else
@@ -77,9 +76,9 @@
     if (! strcmpi (im_type, "indexed"))
       error ('im2double: second input argument must be the string "indexed"');
     elseif (any (isa (img, {"uint8", "uint16"})))
-      img = double (img) + 1;
+      dimg = double (img) + 1;
     elseif (isfloat (img) || isbool (img))
-      img = double (img);
+      dimg = double (img);
     else
       ## Technically, it could also be of logical class and we do not
       ## enforce positive integers for floating for Matlab compatibility.
--- a/scripts/image/im2frame.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/image/im2frame.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} im2frame (@var{rgb})
-## @deftypefnx {} {} im2frame (@var{x}, @var{map})
+## @deftypefn  {} {@var{frame} =} im2frame (@var{rgb})
+## @deftypefnx {} {@var{frame} =} im2frame (@var{x}, @var{map})
 ## Convert image to movie frame.
 ##
 ## A movie frame is simply a struct with the fields @qcode{"cdata"} and
--- a/scripts/java/javachk.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/java/javachk.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} javachk (@var{feature})
-## @deftypefnx {} {} javachk (@var{feature}, @var{caller})
-## @deftypefnx {} {@var{msg} =} javachk (@dots{})
+## @deftypefn  {} {@var{msg} =} javachk (@var{feature})
+## @deftypefnx {} {@var{msg} =} javachk (@var{feature}, @var{caller})
 ## Check for the presence of the Java @var{feature} in the current session.
 ## Return an error structure if @var{feature} is not available, not enabled,
 ## or not recognized.
--- a/scripts/java/usejava.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/java/usejava.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} usejava (@var{feature})
+## @deftypefn {} {@var{tf} =} usejava (@var{feature})
 ## Return true if the Java element @var{feature} is available.
 ##
 ## Possible features are:
@@ -52,32 +52,32 @@
 ## @seealso{javachk}
 ## @end deftypefn
 
-function retval = usejava (feature)
+function tf = usejava (feature)
 
   if (nargin < 1 || ! ischar (feature))
     print_usage ();
   endif
 
-  retval = false;
+  tf = false;
 
   switch (feature)
     ## For each feature, try methods() on a Java class of a feature
     case "awt"
       try
         dum = methods ("java.awt.Frame");
-        retval = ! javaMethod ("isHeadless", "java.awt.GraphicsEnvironment");
+        tf = ! javaMethod ("isHeadless", "java.awt.GraphicsEnvironment");
       end_try_catch
     case "desktop"
-      ## Octave has no Java based GUI/desktop, leave retval = false
+      ## Octave has no Java based GUI/desktop, leave tf = false
     case "jvm"
       try
         dum = methods ("java.lang.Runtime");
-        retval = true;
+        tf = true;
       end_try_catch
     case "swing"
       try
         dum = methods ("javax.swing.Popup");
-        retval = ! javaMethod ("isHeadless", "java.awt.GraphicsEnvironment");
+        tf = ! javaMethod ("isHeadless", "java.awt.GraphicsEnvironment");
       end_try_catch
     otherwise
       error ("usejava: unrecognized FEATURE '%s'", feature);
--- a/scripts/legacy/@inline/argnames.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/@inline/argnames.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} argnames (@var{fun})
+## @deftypefn {} {@var{args} =} argnames (@var{fun})
 ## Return a cell array of character strings containing the names of the
 ## arguments of the inline function @var{fun}.
 ## @seealso{inline, formula, vectorize}
--- a/scripts/legacy/@inline/char.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/@inline/char.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,20 +24,20 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} char (@var{fun})
-## Return a character string representing the inline function @var{fun}.
+## @deftypefn {} {@var{fcnstr} =} char (@var{fcn})
+## Return a character string representing the inline function @var{fcn}.
 ##
-## Note that @code{char (@var{fun})} is equivalent to
-## @code{formula (@var{fun})}.
+## Note that @code{char (@var{fcn})} is equivalent to
+## @code{formula (@var{fcn})}.
 ## @seealso{char, argnames, inline, vectorize}
 ## @end deftypefn
 
-function expr = char (obj)
+function fcnstr = char (obj)
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  expr = obj.expr;
+  fcnstr = obj.expr;
 
 endfunction
--- a/scripts/legacy/@inline/formula.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/@inline/formula.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,20 +24,20 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} formula (@var{fun})
-## Return a character string representing the inline function @var{fun}.
+## @deftypefn {} {@var{fcnstr} =} formula (@var{fcn})
+## Return a character string representing the inline function @var{fcn}.
 ##
-## Note that @code{char (@var{fun})} is equivalent to
-## @code{formula (@var{fun})}.
+## Note that @code{char (@var{fcn})} is equivalent to
+## @code{formula (@var{fcn})}.
 ## @seealso{char, argnames, inline, vectorize}
 ## @end deftypefn
 
-function expr = formula (obj)
+function fcnstr = formula (obj)
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  expr = obj.expr;
+  fcnstr = obj.expr;
 
 endfunction
--- a/scripts/legacy/@inline/inline.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/@inline/inline.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,14 +24,14 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} inline (@var{str})
-## @deftypefnx {} {} inline (@var{str}, @var{arg1}, @dots{})
-## @deftypefnx {} {} inline (@var{str}, @var{n})
+## @deftypefn  {} {@var{fobj} =} inline (@var{str})
+## @deftypefnx {} {@var{fobj} =} inline (@var{str}, @var{arg1}, @dots{})
+## @deftypefnx {} {@var{fobj} =} inline (@var{str}, @var{n})
 ##
 ## This function is obsolete.  Use anonymous functions
 ## (@pxref{Anonymous Functions}) instead.
 ##
-## Create an inline function from the character string @var{str}.
+## Create an inline function object from the character string @var{str}.
 ##
 ## If called with a single argument, the arguments of the generated
 ## function are extracted from the function itself.  The generated
@@ -55,7 +55,7 @@
 ## @seealso{argnames, formula, vectorize, str2func}
 ## @end deftypefn
 
-function obj = inline (expr, varargin)
+function fobj = inline (expr, varargin)
 
   persistent warned = false;
   if (! warned)
@@ -103,7 +103,7 @@
   p.isEmpty = false;
   p.version = 1;
 
-  obj = __inline_ctor__ (p);
+  fobj = __inline_ctor__ (p);
 
 endfunction
 
--- a/scripts/legacy/__vectorize__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/__vectorize__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __vectorize__ (@var{expr})
+## @deftypefn {} {@var{new_expr} =} __vectorize__ (@var{expr})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/legacy/findstr.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/findstr.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} findstr (@var{s}, @var{t})
-## @deftypefnx {} {} findstr (@var{s}, @var{t}, @var{overlap})
+## @deftypefn  {} {@var{v} =} findstr (@var{s}, @var{t})
+## @deftypefnx {} {@var{v} =} findstr (@var{s}, @var{t}, @var{overlap})
 ##
 ## This function is obsolete.  Use @code{strfind} instead.
 ##
--- a/scripts/legacy/flipdim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/flipdim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,13 +24,13 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} flipdim (@var{x})
-## @deftypefnx {} {} flipdim (@var{x}, @var{dim})
+## @deftypefn  {} {@var{B} =} flipdim (@var{A})
+## @deftypefnx {} {@var{B} =} flipdim (@var{A}, @var{dim})
 ## This function is obsolete.  Use @code{flip} instead.
 ## @seealso{flip, fliplr, flipud, rot90, rotdim}
 ## @end deftypefn
 
-function y = flipdim (varargin)
+function B = flipdim (varargin)
 
   persistent warned = false;
   if (! warned)
@@ -39,6 +39,6 @@
              "flipdim is obsolete; please use flip instead");
   endif
 
-  y = flip (varargin{:});
+  B = flip (varargin{:});
 
 endfunction
--- a/scripts/legacy/strmatch.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/strmatch.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} strmatch (@var{s}, @var{A})
-## @deftypefnx {} {} strmatch (@var{s}, @var{A}, "exact")
+## @deftypefn  {} {@var{idx} =} strmatch (@var{s}, @var{A})
+## @deftypefnx {} {@var{idx} =} strmatch (@var{s}, @var{A}, "exact")
 ##
 ## This function is obsolete.  @strong{Use an alternative} such as
 ## @code{strncmp} or @code{strcmp} instead.
--- a/scripts/legacy/vectorize.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/legacy/vectorize.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} vectorize (@var{fun})
+## @deftypefn {} {@var{vfun} =} vectorize (@var{fun})
 ## Create a vectorized version of the anonymous function or expression
 ## @var{fun} by replacing all occurrences of @code{*}, @code{/}, etc.,
 ## with @code{.*}, @code{./}, etc.
@@ -39,7 +39,7 @@
 ## anyway, and most expressions will probably be short.  It may also be
 ## buggy.  Well, don't use this function!
 
-function retval = vectorize (fun)
+function vfun = vectorize (fun)
 
   persistent warned = false;
   if (! warned)
@@ -62,9 +62,9 @@
     args = expr(1:idx);
     expr = expr(idx+1:end);
     new_expr = __vectorize__ (expr);
-    retval = str2func ([args, new_expr]);
+    vfun = str2func ([args, new_expr]);
   elseif (ischar (fun))
-    retval = __vectorize__ (fun);
+    vfun = __vectorize__ (fun);
   else
     error ("vectorize: FUN must be a string or anonymous function handle");
   endif
--- a/scripts/linear-algebra/commutation_matrix.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/commutation_matrix.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} commutation_matrix (@var{m}, @var{n})
+## @deftypefn {} {@var{k} =} commutation_matrix (@var{m}, @var{n})
 ## Return the commutation matrix
 ## @tex
 ##  $K_{m,n}$
--- a/scripts/linear-algebra/cond.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/cond.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} cond (@var{A})
-## @deftypefnx {} {} cond (@var{A}, @var{p})
+## @deftypefn  {} {@var{c} =} cond (@var{A})
+## @deftypefnx {} {@var{c} =} cond (@var{A}, @var{p})
 ## Compute the @var{p}-norm condition number of a matrix with respect to
 ## inversion.
 ##
@@ -51,7 +51,7 @@
 ## @seealso{condest, rcond, condeig, norm, svd}
 ## @end deftypefn
 
-function retval = cond (A, p = 2)
+function c = cond (A, p = 2)
 
   if (nargin < 1)
     print_usage ();
@@ -63,7 +63,7 @@
 
   if (p == 2)
     if (isempty (A))
-      retval = 0.0;
+      c = 0.0;
     elseif (any (! isfinite (A(:))))
       error ("cond: A must not contain Inf or NaN values");
     else
@@ -71,13 +71,13 @@
       sigma_1 = sigma(1);
       sigma_n = sigma(end);
       if (sigma_1 == 0 || sigma_n == 0)
-        retval = Inf;
+        c = Inf;
       else
-        retval = sigma_1 / sigma_n;
+        c = sigma_1 / sigma_n;
       endif
     endif
   else
-    retval = norm (A, p) * norm (inv (A), p);
+    c = norm (A, p) * norm (inv (A), p);
   endif
 
 endfunction
--- a/scripts/linear-algebra/cross.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/cross.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} cross (@var{x}, @var{y})
-## @deftypefnx {} {} cross (@var{x}, @var{y}, @var{dim})
+## @deftypefn  {} {@var{z} =} cross (@var{x}, @var{y})
+## @deftypefnx {} {@var{z} =} cross (@var{x}, @var{y}, @var{dim})
 ## Compute the vector cross product of two 3-dimensional vectors @var{x} and
 ## @var{y}.
 ##
--- a/scripts/linear-algebra/duplication_matrix.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/duplication_matrix.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} duplication_matrix (@var{n})
+## @deftypefn {} {@var{d} =} duplication_matrix (@var{n})
 ## Return the duplication matrix
 ## @tex
 ##  $D_n$
@@ -37,21 +37,21 @@
 ##  $n^2 \times n(n+1)/2$
 ## @end tex
 ## @ifnottex
-## @math{n^2} by @math{n*(n+1)/2}
+## @math{N^2}-by-@math{N*(N+1)/2}
 ## @end ifnottex
 ## matrix such that
 ## @tex
 ##  $D_n * {\rm vech} (A) = {\rm vec} (A)$
 ## @end tex
 ## @ifnottex
-## @nospell{@math{Dn vech (A) = vec (A)}}
+## @nospell{@code{Dn * vech (A) = vec (A)}}
 ## @end ifnottex
 ## for all symmetric
 ## @tex
 ##  $n \times n$
 ## @end tex
 ## @ifnottex
-## @math{n} by @math{n}
+## @math{N}-by-@math{N}
 ## @end ifnottex
 ## matrices
 ## @tex
--- a/scripts/linear-algebra/expm.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/expm.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} expm (@var{A})
+## @deftypefn {} {@var{r} =} expm (@var{A})
 ## Return the exponential of a matrix.
 ##
 ## The matrix exponential is defined as the infinite Taylor series
--- a/scripts/linear-algebra/orth.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/orth.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} orth (@var{A})
-## @deftypefnx {} {} orth (@var{A}, @var{tol})
+## @deftypefn  {} {@var{B} =} orth (@var{A})
+## @deftypefnx {} {@var{B} =} orth (@var{A}, @var{tol})
 ## Return an orthonormal basis of the range space of @var{A}.
 ##
 ## The dimension of the range space is taken as the number of singular values
@@ -38,14 +38,14 @@
 ## @seealso{null}
 ## @end deftypefn
 
-function retval = orth (A, tol)
+function B = orth (A, tol)
 
   if (nargin < 1)
     print_usage ();
   endif
 
   if (isempty (A))
-    retval = [];
+    B = [];
     return;
   endif
 
@@ -72,9 +72,9 @@
   rank = sum (s > tol);
 
   if (rank > 0)
-    retval = -U(:, 1:rank);
+    B = -U(:, 1:rank);
   else
-    retval = zeros (rows, 0);
+    B = zeros (rows, 0);
   endif
 
 endfunction
--- a/scripts/linear-algebra/rank.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/rank.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} rank (@var{A})
-## @deftypefnx {} {} rank (@var{A}, @var{tol})
+## @deftypefn  {} {@var{k} =} rank (@var{A})
+## @deftypefnx {} {@var{k} =} rank (@var{A}, @var{tol})
 ## Compute the rank of matrix @var{A}, using the singular value decomposition.
 ##
 ## The rank is taken to be the number of singular values of @var{A} that are
@@ -79,7 +79,7 @@
 ## @seealso{null, orth, sprank, svd, eps}
 ## @end deftypefn
 
-function retval = rank (A, tol)
+function k = rank (A, tol)
 
   if (nargin < 1)
     print_usage ();
@@ -101,7 +101,7 @@
     tolerance = tol;
   endif
 
-  retval = sum (sigma > tolerance);
+  k = sum (sigma > tolerance);
 
 endfunction
 
--- a/scripts/linear-algebra/rref.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/rref.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} rref (@var{A})
-## @deftypefnx {} {} rref (@var{A}, @var{tol})
+## @deftypefn  {} {@var{r} =} rref (@var{A})
+## @deftypefnx {} {@var{r} =} rref (@var{A}, @var{tol})
 ## @deftypefnx {} {[@var{r}, @var{k}] =} rref (@dots{})
 ## Return the reduced row echelon form of @var{A}.
 ##
@@ -89,7 +89,9 @@
       endif
     endif
   endfor
-  k = find (used);
+  if (nargout > 1)
+    k = find (used);
+  endif
 
 endfunction
 
--- a/scripts/linear-algebra/trace.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/trace.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} trace (@var{A})
+## @deftypefn {} {@var{t} =} trace (@var{A})
 ## Compute the trace of @var{A}, the sum of the elements along the main
 ## diagonal.
 ##
@@ -32,7 +32,7 @@
 ## @seealso{eig}
 ## @end deftypefn
 
-function y = trace (A)
+function t = trace (A)
 
   if (nargin < 1)
     print_usage ();
@@ -41,11 +41,11 @@
   if (ndims (A) > 2)
     error ("trace: only valid on 2-D objects");
   elseif (isempty (A))
-    y = 0;
+    t = 0;
   elseif (isvector (A))
-    y = A(1);
+    t = A(1);
   else
-    y = sum (diag (A));
+    t = sum (diag (A));
   endif
 
 endfunction
--- a/scripts/linear-algebra/vech.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/linear-algebra/vech.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} vech (@var{x})
+## @deftypefn {} {@var{v} =} vech (@var{x})
 ## Return the vector obtained by eliminating all superdiagonal elements of
 ## the square matrix @var{x} and stacking the result one column above the
 ## other.
@@ -37,8 +37,6 @@
 ## See Magnus and Neudecker (1988), Matrix differential calculus with
 ## applications in statistics and econometrics.
 
-## Author KH <Kurt.Hornik@wu-wien.ac.at>
-
 function v = vech (x)
 
   if (nargin < 1)
@@ -58,4 +56,6 @@
 
 %!assert (vech ([1, 2, 3; 4, 5, 6; 7, 8, 9]), [1; 4; 7; 5; 8; 9])
 
+## Test input validation
 %!error <Invalid call> vech ()
+%!error <X must be square> vech ([1,2,3;4,5,6])
--- a/scripts/miscellaneous/cast.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/cast.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,16 +24,16 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} cast (@var{val}, "@var{type}")
-## @deftypefnx {} {} cast (@var{val}, "@var{like}", @var{var})
-## Convert @var{val} to data type @var{type}.
+## @deftypefn  {} {@var{y} =} cast (@var{x}, "@var{type}")
+## @deftypefnx {} {@var{y} =} cast (@var{x}, "@var{like}", @var{var})
+## Convert @var{x} to data type @var{type}.
 ##
-## The input @var{val} may be a scalar, vector, or matrix of a class that is
+## The input @var{x} may be a scalar, vector, or matrix of a class that is
 ## convertible to the target class (see below).
 ##
-## If a variable @var{var} is specified after @qcode{"like"}, @var{val} is
+## If a variable @var{var} is specified after @qcode{"like"}, @var{x} is
 ## converted to the same data type and sparsity attribute.  If @var{var} is
-## complex, @var{val} will be complex, too.
+## complex, @var{x} will be complex, too.
 ##
 ## @var{var} may be and @var{type} may name any of the following built-in
 ## numeric classes:
@@ -55,7 +55,7 @@
 ## @end group
 ## @end example
 ##
-## The value @var{val} may be modified to fit within the range of the new type.
+## The value @var{x} may be modified to fit within the range of the new type.
 ##
 ## Examples:
 ##
@@ -68,7 +68,7 @@
 ## @end group
 ## @end example
 ##
-## Programming Note: This function relies on the object @var{val} having a
+## Programming Note: This function relies on the object @var{x} having a
 ## conversion method named @var{type}.  User-defined classes may implement only
 ## a subset of the full list of types shown above.  In that case, it may be
 ## necessary to call cast twice in order to reach the desired type.
@@ -84,7 +84,7 @@
 ## double, single, logical, char, class, typeinfo}
 ## @end deftypefn
 
-function retval = cast (val, type, var)
+function y = cast (x, type, var)
 
   if (nargin < 2 || nargin > 3)
     print_usage ();
@@ -105,8 +105,8 @@
     print_usage ();
   endif
 
-  if (! isnumeric (val) && ! islogical (val) && ! ischar (val))
-    error ("cast: type conversion from '%s' is not supported", class (val));
+  if (! isnumeric (x) && ! islogical (x) && ! ischar (x))
+    error ("cast: type conversion from '%s' is not supported", class (x));
   endif
 
   if (! any (strcmp (type, {"int8"; "uint8"; "int16"; "uint16"; "int32";
@@ -115,17 +115,17 @@
     error ("cast: type conversion to '%s' is not supported", type);
   endif
 
-  retval = feval (type, val);
+  y = feval (type, x);
 
   if (is_like)
-    if (issparse (var) && ! issparse (retval))
-      ## retval is of the same type as var, so it must be convertible to sparse
-      retval = sparse (retval);
-    elseif (! issparse (var) && issparse (retval))
-      retval = full (retval);
+    if (issparse (var) && ! issparse (y))
+      ## y is of the same type as var, so it must be convertible to sparse
+      y = sparse (y);
+    elseif (! issparse (var) && issparse (y))
+      y = full (y);
     endif
-    if (iscomplex (var) || iscomplex (val))
-      retval = complex (retval);
+    if (iscomplex (var) || iscomplex (x))
+      y = complex (y);
     endif
   endif
 
--- a/scripts/miscellaneous/compare_versions.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/compare_versions.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} compare_versions (@var{v1}, @var{v2}, @var{operator})
+## @deftypefn {} {@var{tf} =} compare_versions (@var{v1}, @var{v2}, @var{operator})
 ## Compare two version strings using the given @var{operator}.
 ##
 ## This function assumes that versions @var{v1} and @var{v2} are arbitrarily
@@ -72,7 +72,7 @@
 ## @code{double ("1").}
 ## @end deftypefn
 
-function out = compare_versions (v1, v2, operator)
+function tf = compare_versions (v1, v2, operator)
 
   if (nargin != 3)
     print_usage ();
@@ -165,18 +165,18 @@
 
   if (isempty (firstdiff))
     ## They're equal.
-    out = equal_op;
+    tf = equal_op;
   elseif (lt_op || gt_op)
     ## They're correctly less than or greater than.
-    out = (vcmp(firstdiff) > 0);
+    tf = (vcmp(firstdiff) > 0);
   else
     ## They're not correctly less than or greater than, and they're not equal.
-    out = false;
+    tf = false;
   endif
 
   ## Reverse the output if not is given.
   if (not_op)
-    out = ! out;
+    tf = ! tf;
   endif
 
 endfunction
--- a/scripts/miscellaneous/delete.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/delete.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} delete (@var{file})
+## @deftypefn  {} {} delete @var{file}
+## @deftypefnx {} {} delete @var{file1} @var{file2} @dots{}
+## @deftypefnx {} {} delete (@var{file})
 ## @deftypefnx {} {} delete (@var{file1}, @var{file2}, @dots{})
 ## @deftypefnx {} {} delete (@var{handle})
 ## Delete the named file or graphics handle.
--- a/scripts/miscellaneous/dir.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/dir.m	Wed Mar 30 20:40:27 2022 -0700
@@ -25,7 +25,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {} {} dir
-## @deftypefnx {} {} dir (@var{directory})
+## @deftypefnx {} {} dir @var{directory}
 ## @deftypefnx {} {[@var{list}] =} dir (@var{directory})
 ## Display file listing for directory @var{directory}.
 ##
@@ -75,13 +75,13 @@
 ## FIXME: This is quite slow for large directories.
 ##        Perhaps it should be converted to C++?
 
-function retval = dir (directory = ".")
+function list = dir (directory = ".")
 
   if (! ischar (directory))
     error ("dir: DIRECTORY argument must be a string");
   endif
 
-  ## Prep the retval.
+  ## Prep the list.
   info = struct (zeros (0, 1),
            {"name", "folder" "date", "bytes", "isdir", "datenum", "statinfo"});
 
@@ -181,7 +181,7 @@
   ## Return the output arguments.
   if (nargout > 0)
     ## Return the requested structure.
-    retval = info;
+    list = info;
   elseif (numel (info) > 0)
     ## Print the structure to the screen.
     printf ("%s", list_in_columns ({info.name}));
--- a/scripts/miscellaneous/fileattrib.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/fileattrib.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fileattrib ()
+## @deftypefn  {} {} fileattrib
+## @deftypefnx {} {} fileattrib @var{file}
 ## @deftypefnx {} {} fileattrib (@var{file})
 ## @deftypefnx {} {[@var{status}, @var{attrib}] =} fileattrib (@dots{})
 ## @deftypefnx {} {[@var{status}, @var{msg}, @var{msgid}] =} fileattrib (@dots{})
--- a/scripts/miscellaneous/grabcode.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/grabcode.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} grabcode (@var{url})
-## @deftypefnx {} {} grabcode (@var{filename})
+## @deftypefn  {} {} grabcode @var{filename}
+## @deftypefnx {} {} grabcode @var{url}
 ## @deftypefnx {} {@var{code_str} =} grabcode (@dots{})
 ##
 ## Grab the code from a report created by the @code{publish} function.
@@ -35,8 +35,8 @@
 ## The @code{publish} function creates this format automatically.
 ##
 ## If no return value is requested the code is saved to a temporary file and
-## opened in the default editor.  NOTE: The temporary file must be saved under
-## a new or the code will be lost.
+## opened in the default editor.  NOTE: The temporary file must be saved to a
+## new filename or the code will be lost.
 ##
 ## If an output is requested the grabbed code will be returned as string
 ## @var{code_str}.
--- a/scripts/miscellaneous/gunzip.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/gunzip.m	Wed Mar 30 20:40:27 2022 -0700
@@ -25,34 +25,34 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {} {} gunzip (@var{gzfile})
-## @deftypefnx {} {} gunzip (@var{gzfile}, @var{dir})
+## @deftypefnx {} {} gunzip (@var{gzfile}, @var{outdir})
 ## @deftypefnx {} {@var{filelist} =} gunzip (@dots{})
 ## Unpack the gzip archive @var{gzfile}.
 ##
 ## If @var{gzfile} is a directory, all gzfiles in the directory will be
 ## recursively unpacked.
 ##
-## If @var{dir} is specified the files are unpacked in this directory rather
+## If @var{outdir} is specified the files are unpacked in this directory rather
 ## than the one where @var{gzfile} is located.
 ##
 ## The optional output @var{filelist} is a list of the uncompressed files.
 ## @seealso{gzip, unpack, bunzip2, unzip, untar}
 ## @end deftypefn
 
-function filelist = gunzip (gzfile, dir = [])
+function filelist = gunzip (gzfile, outdir = [])
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  if (isempty (dir) && ischar (gzfile))
-    dir = fileparts (gzfile);
+  if (isempty (outdir) && ischar (gzfile))
+    outdir = fileparts (gzfile);
   endif
 
   if (nargout > 0)
-    filelist = unpack (gzfile, dir, "gz");
+    filelist = unpack (gzfile, outdir, "gz");
   else
-    unpack (gzfile, dir, "gz");
+    unpack (gzfile, outdir, "gz");
   endif
 
 endfunction
--- a/scripts/miscellaneous/inputname.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/inputname.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,8 +27,8 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} inputname (@var{n})
-## @deftypefnx {} {} inputname (@var{n}, @var{ids_only})
+## @deftypefn  {} {@var{namestr} =} inputname (@var{n})
+## @deftypefnx {} {@var{namestr} =} inputname (@var{n}, @var{ids_only})
 ## Return the name of the @var{n}-th argument to the calling function.
 ##
 ## If the argument is not a simple variable name, return an empty string.
@@ -73,7 +73,7 @@
 ##   arrayfun (fn, a, 'uniformoutput', false)
 ##   % output is {'fn', 'a', '', ''}
 
-function name = inputname (n, ids_only = true)
+function namestr = inputname (n, ids_only = true)
 
   if (nargin < 1)
     print_usage ();
@@ -84,16 +84,16 @@
   endif
 
   try
-    name = evalin ("caller", sprintf ("__varval__ ('.argn.'){%d}", n));
+    namestr = evalin ("caller", sprintf ("__varval__ ('.argn.'){%d}", n));
   catch
-    name = "";
+    namestr = "";
     return;
   end_try_catch
 
   ## For compatibility with Matlab, return empty string if argument name is
   ## not a valid identifier.
-  if (ids_only && ! isvarname (name))
-    name = "";
+  if (ids_only && ! isvarname (namestr))
+    namestr = "";
   elseif (ids_only)
     ## More complicated checking is required to verify name (bug #59103).
     ## NAME may be text, like "Inf", which is an acceptable variable name
@@ -101,9 +101,9 @@
     ## variable name, rather than a function or IEEE number.
     try
       v = evalin ("caller",
-                  sprintf ("evalin ('caller', '__varval__ (\"%s\")')", name));
+                  sprintf ("evalin ('caller', '__varval__ (\"%s\")')", namestr));
     catch
-      name = "";
+      namestr = "";
     end_try_catch
   endif
 
--- a/scripts/miscellaneous/license.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/license.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,10 +28,11 @@
 ## @deftypefnx {} {} license inuse
 ## @deftypefnx {} {} license inuse @var{feature}
 ## @deftypefnx {} {} license ("inuse")
-## @deftypefnx {} {@var{retval} =} license ("inuse")
-## @deftypefnx {} {@var{retval} =} license ("test", @var{feature})
-## @deftypefnx {} {@var{retval} =} license ("checkout", @var{feature})
-## @deftypefnx {} {[@var{retval}, @var{errmsg}] =} license ("checkout", @var{feature})
+## @deftypefnx {} {@var{license_struct} =} license ("inuse")
+## @deftypefnx {} {@var{license_struct} =} license ("inuse", @var{feature})
+## @deftypefnx {} {@var{status} =} license ("test", @var{feature})
+## @deftypefnx {} {@var{status} =} license ("checkout", @var{feature})
+## @deftypefnx {} {[@var{status}, @var{errmsg}] =} license ("checkout", @var{feature})
 ## Get license information for Octave and Octave packages.
 ##
 ## GNU Octave is free software distributed under the GNU General Public
@@ -41,12 +42,12 @@
 ## When called with no extra input arguments, it returns the Octave license,
 ## otherwise the first input defines the operation mode and must be one of
 ## the following strings: @code{inuse}, @code{test}, and @code{checkout}.
-## The optional @var{feature} argument can either be @qcode{"octave"} (core),
-## or an Octave package.
+## The optional @var{feature} argument can either be @qcode{"octave"} (core)
+## or the name of an Octave package.
 ##
 ## @table @asis
 ## @item @qcode{"inuse"}
-## Returns a list of loaded features, i.e., octave and the list of loaded
+## Print a list of loaded features, i.e., "octave" and the list of loaded
 ## packages.  If an output is requested, it returns a struct array with
 ## the fields @qcode{"feature"}, and @qcode{"user"}.
 ##
@@ -66,11 +67,11 @@
 ## @seealso{pkg, ver, version}
 ## @end deftypefn
 
-function [retval, errmsg] = license (cmd, feature, toggle)
+function [status, errmsg] = license (cmd, feature, toggle)
 
   if (nargin == 0)
     ## then only give information about Octave core
-    retval = "GNU General Public License";
+    status = "GNU General Public License";
     return;
   endif
 
@@ -86,7 +87,7 @@
       if (nargout == 0)
         printf ("%s\n", features{:});
       else
-        retval = struct ("feature", features, "user", get_username ());
+        status = struct ("feature", features, "user", get_username ());
       endif
 
     case "test"
@@ -105,7 +106,7 @@
         endswitch
       endif
 
-      retval = any (strcmp (features, feature));
+      status = any (strcmp (features, feature));
 
     case "checkout"
       ## I guess we could have the checkout command load packages but it's not
@@ -116,10 +117,10 @@
         print_usage ();
       endif
 
-      retval = any (strcmp (features, feature));
+      status = any (strcmp (features, feature));
       errmsg = "";
 
-      if (! retval)
+      if (! status)
         errmsg = ['No package named "' feature '" installed'];
       endif
 
--- a/scripts/miscellaneous/list_primes.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/list_primes.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,15 +24,15 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} list_primes ()
-## @deftypefnx {} {} list_primes (@var{n})
+## @deftypefn  {} {@var{p} =} list_primes ()
+## @deftypefnx {} {@var{p} =} list_primes (@var{n})
 ## List the first @var{n} primes.
 ##
 ## If @var{n} is unspecified, the first 25 primes are listed.
 ## @seealso{primes, isprime}
 ## @end deftypefn
 
-function retval = list_primes (n = 25)
+function p = list_primes (n = 25)
 
   if (! isreal (n) || ! isscalar (n))
     error ("list_primes: N must be a real scalar");
@@ -41,10 +41,10 @@
   n = floor (n);
 
   if (n < 1)
-    retval = [];
+    p = [];
     return;
   elseif (n == 1)
-    retval = 2;
+    p = 2;
     return;
   endif
 
@@ -54,7 +54,7 @@
     error ("list_primes: Algorithm failed.  Try primes (n*log (6*n))(1:n)");
   endif
 
-  retval = list(1:n);
+  p = list(1:n);
 
 endfunction
 
--- a/scripts/miscellaneous/ls.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/ls.m	Wed Mar 30 20:40:27 2022 -0700
@@ -58,7 +58,7 @@
 ## @seealso{dir, readdir, glob, what, stat, filesep, ls_command}
 ## @end deftypefn
 
-function retval = ls (varargin)
+function list = ls (varargin)
 
   if (! iscellstr (varargin))
     error ("ls: all arguments must be character strings");
@@ -100,7 +100,7 @@
     elseif (nargout == 0)
       puts (output);
     else
-      retval = strvcat (regexp (output, "[\r\n]+", "split"){:});
+      list = strvcat (regexp (output, "[\r\n]+", "split"){:});
     endif
   else
     ## Just let the output flow if the pager is off.  That way the
--- a/scripts/miscellaneous/mexext.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/mexext.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,13 +24,17 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} mexext ()
+## @deftypefn {} {@var{ext} =} mexext ()
 ## Return the filename extension used for MEX files.
+##
+## Programming Note: Octave uses the extension @file{mex} for all MEX files
+## regardless of the operating system (Linux, Windows, Apple) or the bit-width
+## (32-bit or 64-bit) of the hardware.
 ## @seealso{mex}
 ## @end deftypefn
 
-function retval = mexext ()
-  retval = "mex";
+function ext = mexext ()
+  ext = "mex";
 endfunction
 
 
--- a/scripts/miscellaneous/movefile.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/movefile.m	Wed Mar 30 20:40:27 2022 -0700
@@ -30,6 +30,8 @@
 ## @deftypefnx {} {} movefile (@var{f1})
 ## @deftypefnx {} {} movefile (@var{f1}, @var{f2})
 ## @deftypefnx {} {} movefile (@var{f1}, @var{f2}, 'f')
+## @deftypefnx {} {[@var{status}] =} movefile (@dots{})
+## @deftypefnx {} {[@var{status}, @var{msg}] =} movefile (@dots{})
 ## @deftypefnx {} {[@var{status}, @var{msg}, @var{msgid}] =} movefile (@dots{})
 ## Move the source file or directory @var{f1} to the destination @var{f2}.
 ##
--- a/scripts/miscellaneous/namelengthmax.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/namelengthmax.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} namelengthmax ()
+## @deftypefn {} {@var{n} =} namelengthmax ()
 ## Return the @sc{matlab} compatible maximum variable name length.
 ##
 ## Octave is capable of storing strings up to @math{2^{31} - 1} in length.
--- a/scripts/miscellaneous/nargoutchk.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/nargoutchk.m	Wed Mar 30 20:40:27 2022 -0700
@@ -49,12 +49,12 @@
 
 function msg = nargoutchk (minargs, maxargs, nargs, outtype)
 
-  ## before matlab's 2011b, nargoutchk would return an error message (just the
+  ## Before Matlab 2011b, nargoutchk would return an error message (just the
   ## message in a string).  With 2011b, it no longer returns anything, it
   ## simply gives an error if the args number is incorrect.
   ## To try to keep compatibility with both versions, check nargout and nargin
-  ## to guess if the caller is expecting a value (old syntax)
-  ## or none (new syntax).
+  ## to guess if the caller is expecting a value (old syntax) or none
+  ## (new syntax).
 
   if (nargout == 1 && (nargin == 3 || nargin == 4))
 
--- a/scripts/miscellaneous/nthargout.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/nthargout.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} nthargout (@var{n}, @var{func}, @dots{})
-## @deftypefnx {} {} nthargout (@var{n}, @var{ntot}, @var{func}, @dots{})
+## @deftypefn  {} {@var{arg} =} nthargout (@var{n}, @var{func}, @dots{})
+## @deftypefnx {} {@var{arg} =} nthargout (@var{n}, @var{ntot}, @var{func}, @dots{})
 ## Return the @var{n}th output argument of the function specified by the
 ## function handle or string @var{func}.
 ##
@@ -35,9 +35,9 @@
 ## indices of the output, in which case the output will be a cell array of the
 ## requested output arguments.
 ##
-## The intended use @code{nthargout} is to avoid intermediate variables.  For
-## example, when finding the indices of the maximum entry of a matrix, the
-## following two compositions of nthargout
+## The intended use of @code{nthargout} is to avoid intermediate variables.
+## For  example, when finding the indices of the maximum entry of a matrix, the
+## following two compositions of @code{nthargout}
 ##
 ## @example
 ## @group
@@ -61,8 +61,8 @@
 ## @end group
 ## @end example
 ##
-## It can also be helpful to have all output arguments in a single cell in the
-## following manner:
+## It can also be helpful to have all output arguments collected in a single
+## cell array as the following code demonstrates:
 ##
 ## @example
 ## @var{USV} = nthargout ([1:3], @@svd, hilb (5));
@@ -71,7 +71,7 @@
 ## @seealso{nargin, nargout, varargin, varargout, isargout}
 ## @end deftypefn
 
-function out = nthargout (n, varargin)
+function arg = nthargout (n, varargin)
 
   if (nargin < 2)
     print_usage ();
@@ -99,9 +99,9 @@
   try
     [outargs{:}] = feval (func, args{:});
     if (numel (n) > 1)
-      out = outargs(n);
+      arg = outargs(n);
     else
-      out = outargs{n};
+      arg = outargs{n};
     endif
   catch
     err = lasterr ();
--- a/scripts/miscellaneous/substruct.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/substruct.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} substruct (@var{type}, @var{subs}, @dots{})
+## @deftypefn {} {@var{s} =} substruct (@var{type}, @var{subs}, @dots{})
 ## Create a subscript structure for use with @code{subsref} or @code{subsasgn}.
 ##
 ## For example:
@@ -50,7 +50,7 @@
 ## @seealso{subsref, subsasgn}
 ## @end deftypefn
 
-function retval = substruct (varargin)
+function s = substruct (varargin)
 
   if (nargin < 2 || mod (nargin, 2) != 0)
     print_usage ();
@@ -72,7 +72,7 @@
     error ('substruct: TYPE must be one of "()", "{}", or ""');
   endif
 
-  retval = struct ("type", typ, "subs", sub);
+  s = struct ("type", typ, "subs", sub);
 
 endfunction
 
--- a/scripts/miscellaneous/swapbytes.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/swapbytes.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} swapbytes (@var{x})
+## @deftypefn {} {@var{y} =} swapbytes (@var{x})
 ## Swap the byte order on values, converting from little endian to big endian
 ## and vice versa.
 ##
--- a/scripts/miscellaneous/ver.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/ver.m	Wed Mar 30 20:40:27 2022 -0700
@@ -56,7 +56,7 @@
 ## @seealso{version, usejava, pkg}
 ## @end deftypefn
 
-function retval = ver (package = "")
+function v = ver (package = "")
 
   if (nargout == 0)
     hg_id = __octave_config_info__ ("hg_id");
@@ -91,24 +91,24 @@
     if (isempty (package))
       ## Start with the version info for Octave
       [octver, octdate] = version ();
-      retval = struct ("Name", "Octave", "Version", octver,
-                       "Release", [], "Date", octdate);
+      v = struct ("Name", "Octave", "Version", octver,
+                  "Release", [], "Date", octdate);
       lst = pkg ("list");
       for i = 1:numel (lst)
-        retval(end+1) = struct ("Name", lst{i}.name, "Version", lst{i}.version,
-                                "Release", [], "Date", lst{i}.date);
+        v(end+1) = struct ("Name", lst{i}.name, "Version", lst{i}.version,
+                           "Release", [], "Date", lst{i}.date);
       endfor
     elseif (strcmpi (package, "Octave"))
       [octver, octdate] = version ();
-      retval = struct ("Name", "Octave", "Version", octver,
-                       "Release", [], "Date", octdate);
+      v = struct ("Name", "Octave", "Version", octver,
+                  "Release", [], "Date", octdate);
     else
       lst = pkg ("list", package);
       if (isempty (lst))
-        retval = struct ("Name", {}, "Version", {}, "Release", {}, "Date", {});
+        v = struct ("Name", {}, "Version", {}, "Release", {}, "Date", {});
       else
-        retval = struct ("Name", lst{1}.name, "Version", lst{1}.version,
-                         "Release", [], "Date", lst{1}.date);
+        v = struct ("Name", lst{1}.name, "Version", lst{1}.version,
+                    "Release", [], "Date", lst{1}.date);
       endif
     endif
   endif
--- a/scripts/miscellaneous/verLessThan.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/verLessThan.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} verLessThan (@var{package}, @var{version})
+## @deftypefn {} {@var{tf} =} verLessThan (@var{package}, @var{version})
 ## Return true if the installed version of the package is less than
 ## @var{version}.
 ##
@@ -56,7 +56,7 @@
 ## @seealso{compare_versions, version, ver, pkg}
 ## @end deftypefn
 
-function retval = verLessThan (package, version)
+function tf = verLessThan (package, version)
 
   if (nargin != 2)
     print_usage ();
@@ -72,7 +72,7 @@
     error ('verLessThan: package "%s" is not installed', package);
   endif
 
-  retval = compare_versions (v(idx).Version, version, "<");
+  tf = compare_versions (v(idx).Version, version, "<");
 
 endfunction
 
--- a/scripts/miscellaneous/what.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/miscellaneous/what.m	Wed Mar 30 20:40:27 2022 -0700
@@ -71,7 +71,7 @@
 ## @seealso{which, ls, exist}
 ## @end deftypefn
 
-function retval = what (dir)
+function w = what (dir)
 
   if (nargin == 0)
     dir = { pwd() };
@@ -98,26 +98,26 @@
 
    ## Lookup info for each directory
    for i = 1 : numel (dir)
-     w(i) = __what__ (dir{i});
+     ws(i) = __what__ (dir{i});
    endfor
 
    ## If none was found, return an empty struct
    if (numel (dir) == 0)
-     w = __what__ ("");
-     w = resize (w, [0, 1]);  # Matlab compatibility, return 0x1 empty array
+     ws = __what__ ("");
+     ws = resize (ws, [0, 1]);  # Matlab compatibility, return 0x1 empty array
    endif
 
   if (nargout == 0)
-    for i = 1 : numel (w)
-      __print_fnames__ ("M-files in directory", w(i).path, w(i).m);
-      __print_fnames__ ("\nMAT-files in directory", w(i).path, w(i).mat);
-      __print_fnames__ ("\nMEX-files in directory", w(i).path, w(i).mex);
-      __print_fnames__ ("\nOCT-files in directory", w(i).path, w(i).oct);
-      __print_fnames__ ("\nClasses in directory", w(i).path, w(i).classes);
-      __print_fnames__ ("\nPackages in directory", w(i).path, w(i).packages);
+    for i = 1 : numel (ws)
+      __print_fnames__ ("M-files in directory", ws(i).path, ws(i).m);
+      __print_fnames__ ("\nMAT-files in directory", ws(i).path, ws(i).mat);
+      __print_fnames__ ("\nMEX-files in directory", ws(i).path, ws(i).mex);
+      __print_fnames__ ("\nOCT-files in directory", ws(i).path, ws(i).oct);
+      __print_fnames__ ("\nClasses in directory", ws(i).path, ws(i).classes);
+      __print_fnames__ ("\nPackages in directory", ws(i).path, ws(i).packages);
     endfor
   else
-    retval = w;
+    w = ws;
   endif
 
 endfunction
--- a/scripts/optimization/fminunc.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/optimization/fminunc.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,12 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fminunc (@var{fcn}, @var{x0})
-## @deftypefnx {} {} fminunc (@var{fcn}, @var{x0}, @var{options})
+## @deftypefn  {} {@var{x} =} fminunc (@var{fcn}, @var{x0})
+## @deftypefnx {} {@var{x} =} fminunc (@var{fcn}, @var{x0}, @var{options})
+## @deftypefnx {} {[@var{x}, @var{fval}] =} fminunc (@var{fcn}, @dots{})
+## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}] =} fminunc (@var{fcn}, @dots{})
+## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}] =} fminunc (@var{fcn}, @dots{})
+## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}, @var{grad}] =} fminunc (@var{fcn}, @dots{})
 ## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}, @var{grad}, @var{hess}] =} fminunc (@var{fcn}, @dots{})
 ## Solve an unconstrained optimization problem defined by the function
 ## @var{fcn}.
--- a/scripts/optimization/fsolve.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/optimization/fsolve.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fsolve (@var{fcn}, @var{x0})
-## @deftypefnx {} {} fsolve (@var{fcn}, @var{x0}, @var{options})
+## @deftypefn  {} {@var{x} =} fsolve (@var{fcn}, @var{x0})
+## @deftypefnx {} {@var{x} =} fsolve (@var{fcn}, @var{x0}, @var{options})
+## @deftypefnx {} {[@var{x}, @var{fval}] =} fsolve (@dots{})
+## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}] =} fsolve (@dots{})
+## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}] =} fsolve (@dots{})
 ## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}, @var{fjac}] =} fsolve (@dots{})
 ## Solve a system of nonlinear equations defined by the function @var{fcn}.
 ##
--- a/scripts/optimization/fzero.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/optimization/fzero.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fzero (@var{fun}, @var{x0})
-## @deftypefnx {} {} fzero (@var{fun}, @var{x0}, @var{options})
+## @deftypefn  {} {@var{x} =} fzero (@var{fun}, @var{x0})
+## @deftypefnx {} {@var{x} =} fzero (@var{fun}, @var{x0}, @var{options})
+## @deftypefnx {} {[@var{x}, @var{fval}] =} fzero (@dots{})
+## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}] =} fzero (@dots{})
 ## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}] =} fzero (@dots{})
 ## Find a zero of a univariate function.
 ##
--- a/scripts/optimization/optimget.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/optimization/optimget.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,43 +24,43 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} optimget (@var{options}, @var{parname})
-## @deftypefnx {} {} optimget (@var{options}, @var{parname}, @var{default})
-## Return the specific option @var{parname} from the optimization options
+## @deftypefn  {} {@var{optval} =} optimget (@var{options}, @var{optname})
+## @deftypefnx {} {@var{optval} =} optimget (@var{options}, @var{optname}, @var{default})
+## Return the specific option @var{optname} from the optimization options
 ## structure @var{options} created by @code{optimset}.
 ##
-## If @var{parname} is not defined then return @var{default} if supplied,
+## If @var{optname} is not defined then return @var{default} if supplied,
 ## otherwise return an empty matrix.
 ## @seealso{optimset}
 ## @end deftypefn
 
-function retval = optimget (options, parname, default)
+function optval = optimget (options, optname, default)
 
-  if (nargin < 2 || ! isstruct (options) || ! ischar (parname))
+  if (nargin < 2 || ! isstruct (options) || ! ischar (optname))
     print_usage ();
   endif
 
   ## Expand partial-length names into full names
   opts = __all_opts__ ();
-  idx = strncmpi (opts, parname, length (parname));
+  idx = strncmpi (opts, optname, length (optname));
   nmatch = sum (idx);
 
   if (nmatch == 1)
-    parname = opts{idx};
+    optname = opts{idx};
   elseif (nmatch == 0)
-    warning ("optimget: unrecognized option: %s", parname);
+    warning ("optimget: unrecognized option: %s", optname);
   else
     fmt = sprintf ("optimget: ambiguous option: %%s (%s%%s)",
                    repmat ("%s, ", 1, nmatch-1));
-    warning (fmt, parname, opts{idx});
+    warning (fmt, optname, opts{idx});
   endif
 
-  if (isfield (options, parname) && ! isempty (options.(parname)))
-    retval = options.(parname);
+  if (isfield (options, optname) && ! isempty (options.(optname)))
+    optval = options.(optname);
   elseif (nargin > 2)
-    retval = default;
+    optval = default;
   else
-    retval = [];
+    optval = [];
   endif
 
 endfunction
--- a/scripts/optimization/private/__fdjac__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/optimization/private/__fdjac__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __fdjac__ (@var{fcn}, @var{x}, @var{fvec}, @var{typicalx}, @var{cdif}, @var{err})
+## @deftypefn {} {@var{fjac} =} __fdjac__ (@var{fcn}, @var{x}, @var{fvec}, @var{typicalx}, @var{cdif}, @var{err})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/path/matlabroot.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/path/matlabroot.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} matlabroot ()
+## @deftypefn {} {@var{dir} =} matlabroot ()
 ## Return the name of the top-level Octave installation directory.
 ##
 ## This is an alias for the function @w{@code{OCTAVE_HOME}} provided for
@@ -32,9 +32,9 @@
 ## @seealso{OCTAVE_HOME}
 ## @end deftypefn
 
-function retval = matlabroot ()
+function dir = matlabroot ()
 
-  retval = OCTAVE_HOME ();
+  dir = OCTAVE_HOME ();
 
 endfunction
 
--- a/scripts/path/savepath.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/path/savepath.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} savepath ()
-## @deftypefnx {} {} savepath (@var{file})
+## @deftypefn  {} {} savepath
+## @deftypefnx {} {} savepath @var{file}
 ## @deftypefnx {} {@var{status} =} savepath (@dots{})
 ## Save the unique portion of the current function search path that is
 ## not set during Octave's initialization process to @var{file}.
@@ -46,7 +46,7 @@
 ## @seealso{path, addpath, rmpath, genpath, pathdef}
 ## @end deftypefn
 
-function retval = savepath (file)
+function status = savepath (file)
 
   beginstring = "## Begin savepath auto-created section, do not edit";
   endstring   = "## End savepath auto-created section";
@@ -170,8 +170,8 @@
 
     fprintf (fid, "%s\n", post{:});
   unwind_protect_cleanup
-    status = fclose (fid);
-    if (status < 0)
+    sts = fclose (fid);
+    if (sts < 0)
       error ("savepath: could not close savefile after writing, %s", file);
     elseif (nargin == 0)
       warning ("off", "backtrace", "local");
@@ -181,7 +181,7 @@
   end_unwind_protect
 
   if (nargout > 0)
-    retval = 0;
+    status = 0;
   endif
 
 endfunction
--- a/scripts/plot/appearance/campos.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/campos.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,12 +24,12 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{P} =} campos ()
+## @deftypefn  {} {@var{p} =} campos ()
 ## @deftypefnx {} {} campos ([@var{x} @var{y} @var{z}])
 ## @deftypefnx {} {@var{mode} =} campos ("mode")
 ## @deftypefnx {} {} campos (@var{mode})
-## @deftypefnx {} {} campos (@var{ax}, @dots{})
-## Set or get the camera position.
+## @deftypefnx {} {} campos (@var{hax}, @dots{})
+## Get or set the camera position.
 ##
 ## The default camera position is determined automatically based on the scene.
 ## For example, to get the camera position:
@@ -77,7 +77,7 @@
 ## @end example
 ##
 ## By default, these commands affect the current axis; alternatively, an axis
-## can be specified by the optional argument @var{ax}.
+## can be specified by the optional argument @var{hax}.
 ##
 ## @seealso{camup, camtarget, camva}
 ## @end deftypefn
@@ -161,7 +161,7 @@
 %!   delete (hf);
 %! end_unwind_protect
 
-## test ax input by creating another axis
+## test hax input by creating another axis
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/appearance/camroll.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/camroll.m	Wed Mar 30 20:40:27 2022 -0700
@@ -25,7 +25,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {} {} camroll (@var{theta})
-## @deftypefnx {} {} camroll (@var{ax}, @var{theta})
+## @deftypefnx {} {} camroll (@var{hax}, @var{theta})
 ## Roll the camera.
 ##
 ## Roll the camera clockwise by @var{theta} degrees.
@@ -60,7 +60,7 @@
 ## @end example
 ##
 ## By default, these commands affect the current axis; alternatively, an axis
-## can be specified by the optional argument @var{ax}.
+## can be specified by the optional argument @var{hax}.
 ##
 ## @seealso{camzoom, camorbit, camlookat, camup}
 ## @end deftypefn
@@ -149,7 +149,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-## test ax input by creating another axis
+## test hax input by creating another axis
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/appearance/camtarget.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/camtarget.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,12 +24,12 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{T} =} camtarget ()
+## @deftypefn  {} {@var{t} =} camtarget ()
 ## @deftypefnx {} {} camtarget ([@var{x} @var{y} @var{z}])
 ## @deftypefnx {} {@var{mode} =} camtarget ("mode")
 ## @deftypefnx {} {} camtarget (@var{mode})
-## @deftypefnx {} {} camtarget (@var{ax}, @dots{})
-## Set or get where the camera is pointed.
+## @deftypefnx {} {} camtarget (@var{hax}, @dots{})
+## Get or set where the camera is pointed.
 ##
 ## The camera target is a point in space where the camera is pointing.
 ## Usually, it is determined automatically based on the scene:
@@ -89,13 +89,13 @@
 ## @end example
 ##
 ## By default, these commands affect the current axis; alternatively, an axis
-## can be specified by the optional argument @var{ax}.
+## can be specified by the optional argument @var{hax}.
 ##
 ## @seealso{campos, camup, camva}
 ## @end deftypefn
 
 
-function p = camtarget (varargin)
+function t = camtarget (varargin)
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("camtarget", varargin{:});
 
@@ -111,13 +111,13 @@
 
   prop = "cameratarget";
   if (nargin == 0)
-    p = get (hax, prop);
+    t = get (hax, prop);
   elseif (nargin == 1 && isnumeric (varargin{1}) && numel (varargin{1}) == 3)
     set (hax, prop, varargin{1});
   elseif (nargin == 1 && ischar (varargin{1}))
     s = varargin{1};
     if (strcmp (s, "mode"))
-      p = get (hax, [prop "mode"]);
+      t = get (hax, [prop "mode"]);
     else
       set (hax, [prop "mode"], s);
     endif
@@ -172,7 +172,7 @@
 %!   delete (hf);
 %! end_unwind_protect
 
-## test ax input by creating another axis
+## test hax input by creating another axis
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/appearance/camup.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/camup.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,8 +28,8 @@
 ## @deftypefnx {} {} camup ([@var{x} @var{y} @var{z}])
 ## @deftypefnx {} {@var{mode} =} camup ("mode")
 ## @deftypefnx {} {} camup (@var{mode})
-## @deftypefnx {} {} camup (@var{ax}, @dots{})
-## Set or get the camera up vector.
+## @deftypefnx {} {} camup (@var{hax}, @dots{})
+## Get or set the camera up vector.
 ##
 ## By default, the camera is oriented so that ``up'' corresponds to the
 ## positive z-axis:
@@ -85,13 +85,13 @@
 ## @end example
 ##
 ## By default, these commands affect the current axis; alternatively, an axis
-## can be specified by the optional argument @var{ax}.
+## can be specified by the optional argument @var{hax}.
 ##
 ## @seealso{campos, camtarget, camva}
 ## @end deftypefn
 
 
-function p = camup (varargin)
+function up = camup (varargin)
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("camup", varargin{:});
 
@@ -107,13 +107,13 @@
 
   prop = "cameraupvector";
   if (nargin == 0)
-    p = get (hax, prop);
+    up = get (hax, prop);
   elseif (nargin == 1 && isnumeric (varargin{1}) && numel (varargin{1}) == 3)
     set (hax, prop, varargin{1});
   elseif (nargin == 1 && ischar (varargin{1}))
     s = varargin{1};
     if (strcmp (s, "mode"))
-      p = get (hax, [prop "mode"]);
+      up = get (hax, [prop "mode"]);
     else
       set (hax, [prop "mode"], s);
     endif
@@ -168,7 +168,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-## test ax input by creating another axis
+## test hax input by creating another axis
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/appearance/camva.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/camva.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,8 +28,8 @@
 ## @deftypefnx {} {} camva (@var{a})
 ## @deftypefnx {} {@var{mode} =} camva ("mode")
 ## @deftypefnx {} {} camva (@var{mode})
-## @deftypefnx {} {} camva (@var{ax}, @dots{})
-## Set or get the camera viewing angle.
+## @deftypefnx {} {} camva (@var{hax}, @dots{})
+## Get or set the camera viewing angle.
 ##
 ## The camera has a viewing angle which determines how much can be seen.  By
 ## default this is:
@@ -68,13 +68,13 @@
 ## @end example
 ##
 ## By default, these commands affect the current axis; alternatively, an axis
-## can be specified by the optional argument @var{ax}.
+## can be specified by the optional argument @var{hax}.
 ##
 ## @seealso{campos, camtarget, camup}
 ## @end deftypefn
 
 
-function p = camva (varargin)
+function a = camva (varargin)
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("camva", varargin{:});
 
@@ -90,13 +90,13 @@
 
   prop = "cameraviewangle";
   if (nargin == 0)
-    p = get (hax, prop);
+    a = get (hax, prop);
   elseif (nargin == 1 && isnumeric (varargin{1}) && isscalar (varargin{1}))
     set (hax, prop, varargin{1});
   elseif (nargin == 1 && ischar (varargin{1}))
     s = varargin{1};
     if (strcmp (s, "mode"))
-      p = get (hax, [prop "mode"]);
+      a = get (hax, [prop "mode"]);
     else
       set (hax, [prop "mode"], s);
     endif
@@ -151,7 +151,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-## test ax input by creating another axis
+## test hax input by creating another axis
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/appearance/camzoom.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/camzoom.m	Wed Mar 30 20:40:27 2022 -0700
@@ -25,7 +25,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn  {} {} camzoom (@var{zf})
-## @deftypefnx {} {} camzoom (@var{ax}, @var{zf})
+## @deftypefnx {} {} camzoom (@var{hax}, @var{zf})
 ## Zoom the camera in or out.
 ##
 ## A value of @var{zf} larger than 1 ``zooms in'' such that the scene appears
@@ -59,7 +59,7 @@
 ## @end example
 ##
 ## By default, these commands affect the current axis; alternatively, an axis
-## can be specified by the optional argument @var{ax}.
+## can be specified by the optional argument @var{hax}.
 ##
 ## @seealso{camroll, camorbit, camlookat, camva}
 ## @end deftypefn
@@ -143,7 +143,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-## test ax input by creating another axis
+## test hax input by creating another axis
 %!test
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/appearance/clabel.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/clabel.m	Wed Mar 30 20:40:27 2022 -0700
@@ -29,7 +29,7 @@
 ## @deftypefnx {} {} clabel (@var{c}, @var{h}, "manual")
 ## @deftypefnx {} {} clabel (@var{c})
 ## @deftypefnx {} {} clabel (@dots{}, @var{prop}, @var{val}, @dots{})
-## @deftypefnx {} {@var{h} =} clabel (@dots{})
+## @deftypefnx {} {@var{hlabels} =} clabel (@dots{})
 ## Add labels to the contours of a contour plot.
 ##
 ## The contour levels are specified by the contour matrix @var{c} which is
@@ -51,7 +51,7 @@
 ## determines the spacing between labels on a contour to be specified.  The
 ## default is 144 points, or 2 inches.
 ##
-## The optional return value @var{h} is a vector of graphics handles to
+## The optional return value @var{hlabels} is a vector of graphics handles to
 ## the text objects representing each label.
 ## The @qcode{"userdata"} property of the text objects contains the numerical
 ## value of the contour label.
@@ -69,7 +69,7 @@
 ## @seealso{contour, contourf, contour3, meshc, surfc, text}
 ## @end deftypefn
 
-function h = clabel (c, varargin)
+function hlabels = clabel (c, varargin)
 
   have_hg = false;
   have_labelspacing = false;
@@ -138,7 +138,7 @@
   endif
 
   if (nargout > 0)
-    h = htmp;
+    hlabels = htmp;
   endif
 
 endfunction
--- a/scripts/plot/appearance/diffuse.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/diffuse.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} diffuse (@var{sx}, @var{sy}, @var{sz}, @var{lv})
+## @deftypefn {} {@var{d} =} diffuse (@var{sx}, @var{sy}, @var{sz}, @var{lv})
 ## Calculate the diffuse reflection strength of a surface defined by the normal
 ## vector elements @var{sx}, @var{sy}, @var{sz}.
 ##
@@ -33,7 +33,7 @@
 ## @seealso{specular, surfl}
 ## @end deftypefn
 
-function retval = diffuse (sx, sy, sz, lv)
+function d = diffuse (sx, sy, sz, lv)
 
   if (nargin != 4)
     print_usage ();
@@ -57,7 +57,7 @@
   endif
 
   ns = sqrt (sx.^2 + sy.^2 + sz.^2);
-  retval = (sx * lv(1) + sy * lv(2) + sz * lv(3)) ./ ns;
-  retval(retval < 0) = 0;
+  d = (sx * lv(1) + sy * lv(2) + sz * lv(3)) ./ ns;
+  d(d < 0) = 0;
 
 endfunction
--- a/scripts/plot/appearance/legend.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/legend.m	Wed Mar 30 20:40:27 2022 -0700
@@ -34,7 +34,7 @@
 ## @deftypefnx {} {} legend ("@var{command}")
 ## @deftypefnx {} {} legend (@var{hax}, @dots{})
 ## @deftypefnx {} {} legend (@var{hleg}, @dots{})
-## @deftypefnx {} {@var{hleg, hplt} =} legend (@dots{})
+## @deftypefnx {} {@var{hleg} =} legend (@dots{})
 ##
 ## Display a legend for the current axes using the specified strings as labels.
 ##
--- a/scripts/plot/appearance/orient.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/orient.m	Wed Mar 30 20:40:27 2022 -0700
@@ -51,7 +51,7 @@
 ## @seealso{print, saveas}
 ## @end deftypefn
 
-function retval = orient (varargin)
+function orientation = orient (varargin)
 
   cf = [];
   if (nargin > 0 && isscalar (varargin{1}) && isfigure (varargin{1}))
@@ -73,28 +73,28 @@
     set (cf, "paperunits", "inches");  # All Matlab calculations assume inches.
 
     if (nargin == 0)
-      retval = get (cf, "paperorientation");
-      if (strcmp (retval, "portrait"))
+      orientation = get (cf, "paperorientation");
+      if (strcmp (orientation, "portrait"))
         papersize = get (cf, "papersize");
         paperposition = get (cf, "paperposition");
         if (paperposition == [0.25 0.25 (papersize - 0.5)])
-          retval = "tall";
+          orientation = "tall";
         endif
       endif
     else
-      orientation = varargin{1};
-      if (strcmpi (orientation, "landscape")
-          || strcmpi (orientation, "portrait"))
-        if (! strcmpi (get (cf, "paperorientation"), orientation))
+      paporient = varargin{1};
+      if (strcmpi (paporient, "landscape")
+          || strcmpi (paporient, "portrait"))
+        if (! strcmpi (get (cf, "paperorientation"), paporient))
           ## FIXME: with the proper listeners in place there won't be a need to
           ##        set the papersize and paperposition here.
           papersize = get (cf, "papersize");
           paperposition = get (cf, "paperposition");
-          set (cf, "paperorientation", orientation,
+          set (cf, "paperorientation", paporient,
                    "papersize", papersize([2, 1]),
                    "paperposition", paperposition([2, 1, 4, 3]));
         endif
-        if (strcmpi (orientation, "portrait"))
+        if (strcmpi (paporient, "portrait"))
           ## portrait restores the default
           ## FIXME: Should use "default" here, but Octave complains
           ##        that "paperposition" is not a default property.
@@ -104,7 +104,7 @@
           papersize = get (cf, "papersize");
           set (cf, "paperposition", [0.25, 0.25, (papersize - 0.5)]);
         endif
-      elseif (strcmpi (orientation, "tall"))
+      elseif (strcmpi (paporient, "tall"))
         orient ("portrait");
         papersize = get (cf, "papersize");
         set (cf, "paperposition", [0.25, 0.25, (papersize - 0.5)]);
--- a/scripts/plot/appearance/rticks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/rticks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -48,17 +48,17 @@
 ## @seealso{thetaticks, xticks, yticks, zticks, polar, get, set}
 ## @end deftypefn
 
-function retval = rticks (varargin)
+function tickval = rticks (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca (), "rtick");  # will error if no rtick exists.
+      tickval = get (gca (), "rtick");  # will error if no rtick exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "rtick");
+        tickval = get (varargin{1}, "rtick");
         return;
       else
         arg = varargin{1};
@@ -95,7 +95,7 @@
     ## arg = tolower (arg);
     ## switch (arg)
     ##   case "mode"
-    ##     retval = get (hax, "rtickmode");
+    ##     tickval = get (hax, "rtickmode");
     ##
     ##   case {"auto", "manual"}
     ##     if (nargout > 0)
--- a/scripts/plot/appearance/specular.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/specular.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv})
-## @deftypefnx {} {} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv}, @var{se})
+## @deftypefn  {} {@var{refl} =} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv})
+## @deftypefnx {} {@var{refl} =} specular (@var{sx}, @var{sy}, @var{sz}, @var{lv}, @var{vv}, @var{se})
 ## Calculate the specular reflection strength of a surface defined by the
 ## normal vector elements @var{sx}, @var{sy}, @var{sz} using Phong's
 ## approximation.
@@ -40,7 +40,7 @@
 ## @seealso{diffuse, surfl}
 ## @end deftypefn
 
-function retval = specular (sx, sy, sz, lv, vv, se)
+function refl = specular (sx, sy, sz, lv, vv, se)
 
   if (nargin < 5)
     print_usage ();
@@ -86,13 +86,13 @@
   v_dot_n = (sx * vv(1) + sy * vv(2) + sz * vv(3)) ./ ns;
 
   ## Calculate specular reflection using Phong's approximation
-  retval = 2 * l_dot_n .* v_dot_n - dot (lv, vv);
+  refl = 2 * l_dot_n .* v_dot_n - dot (lv, vv);
 
   ## Set reflectance to zero if light is on the other side
-  retval(l_dot_n < 0) = 0;
+  refl(l_dot_n < 0) = 0;
 
   ## Allow positive values only
-  retval(retval < 0) = 0;
-  retval .^= se;
+  refl(refl < 0) = 0;
+  refl .^= se;
 
 endfunction
--- a/scripts/plot/appearance/thetaticks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/thetaticks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -48,7 +48,7 @@
 ## @seealso{rticks, xticks, yticks, zticks, polar, get, set}
 ## @end deftypefn
 
-function retval = thetaticks (varargin)
+function tickval = thetaticks (varargin)
 
   ## FIXME: Update function to work with polaraxes objects once that function
   ##        is implemented in Octave.  For compatibility with Matlab this may
@@ -57,12 +57,12 @@
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca , "ttick");  # will error if no ttick exists.
+      tickval = get (gca , "ttick");  # will error if no ttick exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "ttick");
+        tickval = get (varargin{1}, "ttick");
         return;
       else
         arg = varargin{1};
@@ -99,7 +99,7 @@
     ##    arg = tolower (arg);
     ## switch (arg)
     ##   case "mode"
-    ##     retval = get (hax, "ttickmode");
+    ##     tickval = get (hax, "ttickmode");
     ##
     ##   case {"auto", "manual"}
     ##     if (nargout > 0)
--- a/scripts/plot/appearance/xlim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/xlim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -55,12 +55,12 @@
 ## @seealso{ylim, zlim, axis, set, get, gca}
 ## @end deftypefn
 
-function retval = xlim (varargin)
+function xlimits = xlim (varargin)
 
-  ret = __axis_limits__ ("xlim", varargin{:});
+  lims = __axis_limits__ ("xlim", varargin{:});
 
-  if (! isempty (ret))
-    retval = ret;
+  if (! isempty (lims))
+    xlimits = lims;
   endif
 
 endfunction
--- a/scripts/plot/appearance/xtickangle.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/xtickangle.m	Wed Mar 30 20:40:27 2022 -0700
@@ -45,22 +45,22 @@
 ## @seealso{ytickangle, ztickangle, get, set}
 ## @end deftypefn
 
-function retval = xtickangle (hax, angle)
+function angle = xtickangle (hax, angle)
 
   switch (nargin)
     case 0
-      retval = __tickangle__ (mfilename ());
+      angle = __tickangle__ (mfilename ());
 
     case 1
       if (nargout > 0)
-        retval = __tickangle__ (mfilename (), hax);
+        angle = __tickangle__ (mfilename (), hax);
       else
         __tickangle__ (mfilename (), hax);
       endif
 
     case 2
       if (nargout > 0)
-        retval = __tickangle__ (mfilename (), hax, angle);
+        angle = __tickangle__ (mfilename (), hax, angle);
       else
         __tickangle__ (mfilename (), hax, angle);
       endif
--- a/scripts/plot/appearance/xticklabels.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/xticklabels.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{tickval} =} xticklabels
+## @deftypefn  {} {@var{labels} =} xticklabels
 ## @deftypefnx {} {@var{mode} =} xticklabels ("mode")
 ## @deftypefnx {} {} xticklabels (@var{tickval})
 ## @deftypefnx {} {} xticklabels ("auto")
@@ -56,17 +56,17 @@
 ## @seealso{xticks, yticklabels, zticklabels, get, set}
 ## @end deftypefn
 
-function retval = xticklabels (varargin)
+function labels = xticklabels (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca , "xticklabel");  # will error if no xticklabel exists.
+      labels = get (gca , "xticklabel");  # will error if no xticklabel exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "xticklabel");
+        labels = get (varargin{1}, "xticklabel");
         return;
       else
         arg = varargin{1};
@@ -117,7 +117,7 @@
     arg = tolower (arg);
     switch (arg)
       case "mode"
-        retval = get (hax, "xticklabelmode");
+        labels = get (hax, "xticklabelmode");
 
       case {"auto", "manual"}
         if (nargout > 0)
--- a/scripts/plot/appearance/xticks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/xticks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -53,17 +53,17 @@
 ## @seealso{xticklabels, yticks, zticks, rticks, thetaticks, get, set}
 ## @end deftypefn
 
-function retval = xticks (varargin)
+function tickval = xticks (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca, "xtick");  # will error if no xtick exists.
+      tickval = get (gca, "xtick");  # will error if no xtick exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "xtick");
+        tickval = get (varargin{1}, "xtick");
         return;
       else
         arg = varargin{1};
@@ -97,7 +97,7 @@
     arg = tolower (arg);
     switch (arg)
       case "mode"
-        retval = get (hax, "xtickmode");
+        tickval = get (hax, "xtickmode");
 
       case {"auto", "manual"}
         if (nargout > 0)
--- a/scripts/plot/appearance/ylim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/ylim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -55,12 +55,12 @@
 ## @seealso{xlim, zlim, axis, set, get, gca}
 ## @end deftypefn
 
-function retval = ylim (varargin)
+function ylimits = ylim (varargin)
 
-  ret = __axis_limits__ ("ylim", varargin{:});
+  lims = __axis_limits__ ("ylim", varargin{:});
 
-  if (! isempty (ret))
-    retval = ret;
+  if (! isempty (lims))
+    ylimits = lims;
   endif
 
 endfunction
--- a/scripts/plot/appearance/ytickangle.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/ytickangle.m	Wed Mar 30 20:40:27 2022 -0700
@@ -45,22 +45,22 @@
 ## @seealso{xtickangle, ztickangle, get, set}
 ## @end deftypefn
 
-function retval = ytickangle (hax, angle)
+function angle = ytickangle (hax, angle)
 
   switch (nargin)
     case 0
-      retval = __tickangle__ (mfilename ());
+      angle = __tickangle__ (mfilename ());
 
     case 1
       if (nargout > 0)
-        retval = __tickangle__ (mfilename (), hax);
+        angle = __tickangle__ (mfilename (), hax);
       else
         __tickangle__ (mfilename (), hax);
       endif
 
     case 2
       if (nargout > 0)
-        retval = __tickangle__ (mfilename (), hax, angle);
+        angle = __tickangle__ (mfilename (), hax, angle);
       else
         __tickangle__ (mfilename (), hax, angle);
       endif
--- a/scripts/plot/appearance/yticklabels.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/yticklabels.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{tickval} =} yticklabels
+## @deftypefn  {} {@var{labels} =} yticklabels
 ## @deftypefnx {} {@var{mode} =} yticklabels ("mode")
 ## @deftypefnx {} {} yticklabels (@var{tickval})
 ## @deftypefnx {} {} yticklabels ("auto")
@@ -56,17 +56,17 @@
 ## @seealso{yticks, xticklabels, zticklabels, get, set}
 ## @end deftypefn
 
-function retval = yticklabels (varargin)
+function labels = yticklabels (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca , "yticklabel"); # will error if no yticklabel exists.
+      labels = get (gca , "yticklabel"); # will error if no yticklabel exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "yticklabel");
+        labels = get (varargin{1}, "yticklabel");
         return;
       else
         arg = varargin{1};
@@ -117,7 +117,7 @@
     arg = tolower (arg);
     switch (arg)
       case "mode"
-        retval = get (hax, "yticklabelmode");
+        labels = get (hax, "yticklabelmode");
 
       case {"auto", "manual"}
         if (nargout > 0)
--- a/scripts/plot/appearance/yticks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/yticks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -53,17 +53,17 @@
 ## @seealso{yticklabels, xticks, zticks, rticks, thetaticks, get, set}
 ## @end deftypefn
 
-function retval = yticks (varargin)
+function tickval = yticks (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca , "ytick");  # will error if no ytick exists.
+      tickval = get (gca , "ytick");  # will error if no ytick exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "ytick");
+        tickval = get (varargin{1}, "ytick");
         return;
       else
         arg = varargin{1};
@@ -99,7 +99,7 @@
     arg = tolower (arg);
     switch (arg)
       case "mode"
-        retval = get (hax, "ytickmode");
+        tickval = get (hax, "ytickmode");
 
       case {"auto", "manual"}
         if (nargout > 0)
--- a/scripts/plot/appearance/zlim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/zlim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -55,12 +55,12 @@
 ## @seealso{xlim, ylim, axis, set, get, gca}
 ## @end deftypefn
 
-function retval = zlim (varargin)
+function zlimits = zlim (varargin)
 
-  ret = __axis_limits__ ("zlim", varargin{:});
+  lims = __axis_limits__ ("zlim", varargin{:});
 
-  if (! isempty (ret))
-    retval = ret;
+  if (! isempty (lims))
+    zlimits = lims;
   endif
 
 endfunction
--- a/scripts/plot/appearance/ztickangle.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/ztickangle.m	Wed Mar 30 20:40:27 2022 -0700
@@ -45,22 +45,22 @@
 ## @seealso{xtickangle, ytickangle, get, set}
 ## @end deftypefn
 
-function retval = ztickangle (hax, angle)
+function angle = ztickangle (hax, angle)
 
   switch (nargin)
     case 0
-      retval = __tickangle__ (mfilename ());
+      angle = __tickangle__ (mfilename ());
 
     case 1
       if (nargout > 0)
-        retval = __tickangle__ (mfilename (), hax);
+        angle = __tickangle__ (mfilename (), hax);
       else
         __tickangle__ (mfilename (), hax);
       endif
 
     case 2
       if (nargout > 0)
-        retval = __tickangle__ (mfilename (), hax, angle);
+        angle = __tickangle__ (mfilename (), hax, angle);
       else
         __tickangle__ (mfilename (), hax, angle);
       endif
--- a/scripts/plot/appearance/zticklabels.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/zticklabels.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{tickval} =} zticklabels
+## @deftypefn  {} {@var{labels} =} zticklabels
 ## @deftypefnx {} {@var{mode} =} zticklabels ("mode")
 ## @deftypefnx {} {} zticklabels (@var{tickval})
 ## @deftypefnx {} {} zticklabels ("auto")
@@ -56,17 +56,17 @@
 ## @seealso{zticks, xticklabels, zticklabels, get, set}
 ## @end deftypefn
 
-function retval = zticklabels (varargin)
+function labels = zticklabels (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca , "zticklabel"); # will error if no zticklabel exists.
+      labels = get (gca , "zticklabel"); # will error if no zticklabel exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "zticklabel");
+        labels = get (varargin{1}, "zticklabel");
         return;
       else
         arg = varargin{1};
@@ -117,7 +117,7 @@
     arg = tolower (arg);
     switch (arg)
       case "mode"
-        retval = get (hax, "zticklabelmode");
+        labels = get (hax, "zticklabelmode");
 
       case {"auto", "manual"}
         if (nargout > 0)
--- a/scripts/plot/appearance/zticks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/appearance/zticks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -53,17 +53,17 @@
 ## @seealso{zticklabels, xticks, yticks, rticks, thetaticks, get, set}
 ## @end deftypefn
 
-function retval = zticks (varargin)
+function tickval = zticks (varargin)
 
   hax = [];
   switch (nargin)
     case 0
-      retval = get (gca , "ztick");  # will error if no ztick exists.
+      tickval = get (gca , "ztick");  # will error if no ztick exists.
       return;
 
     case 1
       if (isaxes (varargin{1}))
-        retval = get (varargin{1}, "ztick");
+        tickval = get (varargin{1}, "ztick");
         return;
       else
         arg = varargin{1};
@@ -97,7 +97,7 @@
     arg = tolower (arg);
     switch (arg)
       case "mode"
-        retval = get (hax, "ztickmode");
+        tickval = get (hax, "ztickmode");
 
       case {"auto", "manual"}
         if (nargout > 0)
--- a/scripts/plot/draw/ellipsoid.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/draw/ellipsoid.m	Wed Mar 30 20:40:27 2022 -0700
@@ -64,20 +64,24 @@
     n = 20;
   else
     n = varargin{7};
+    if (! (isreal (n) && isscalar (n) && n > 0))
+      error ("ellipsoid: N must be a real scalar > 0");
+    endif
+    n = floor (n);
   endif
 
   theta = linspace (0, 2 * pi, n + 1);
   phi = linspace (-pi / 2, pi / 2, n + 1);
   [theta, phi] = meshgrid (theta, phi);
 
-  x = xr .* cos (phi) .* cos (theta) + xc;
-  y = yr .* cos (phi) .* sin (theta) + yc;
-  z = zr .* sin (phi) + zc;
+  xx = xr .* cos (phi) .* cos (theta) + xc;
+  yy = yr .* cos (phi) .* sin (theta) + yc;
+  zz = zr .* sin (phi) + zc;
 
   if (nargout > 0)
-    xx = x;
-    yy = y;
-    zz = z;
+    x = xx;
+    y = yy;
+    z = zz;
   else
     oldfig = [];
     if (! isempty (hax))
@@ -86,7 +90,7 @@
     unwind_protect
       hax = newplot (hax);
 
-      surf (x, y, z);
+      surf (xx, yy, zz);
     unwind_protect_cleanup
       if (! isempty (oldfig))
         set (0, "currentfigure", oldfig);
@@ -101,3 +105,10 @@
 %! clf;
 %! ellipsoid (0, 0, 1, 2, 3, 4, 20);
 %! title ("ellipsoid()");
+
+## Test input validation
+%!error <Invalid call> ellipsoid (1,2,3,4,5)
+%!error <Invalid call> ellipsoid (1,2,3,4,5,6,7,8)
+%!error <N must be a real scalar> ellipsoid (1,2,3,4,5,6, 2i)
+%!error <N must be a real scalar> ellipsoid (1,2,3,4,5,6, ones (2,2))
+%!error <N must be a real scalar . 0> ellipsoid (1,2,3,4,5,6, -1)
--- a/scripts/plot/draw/isocolors.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/draw/isocolors.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,8 +28,8 @@
 ## @deftypefnx {} {@var{cdat} =} isocolors (@var{x}, @var{y}, @var{z}, @var{c}, @var{v})
 ## @deftypefnx {} {@var{cdat} =} isocolors (@var{x}, @var{y}, @var{z}, @var{r}, @var{g}, @var{b}, @var{v})
 ## @deftypefnx {} {@var{cdat} =} isocolors (@var{r}, @var{g}, @var{b}, @var{v})
-## @deftypefnx {} {@var{cdat} =} isocolors (@dots{}, @var{p})
-## @deftypefnx {} {} isocolors (@dots{})
+## @deftypefnx {} {@var{cdat} =} isocolors (@dots{}, @var{hp})
+## @deftypefnx {} {} isocolors (@dots{}, @var{hp})
 ##
 ## Compute isosurface colors.
 ##
@@ -50,10 +50,10 @@
 ## @var{y}, @var{z} are not given then @code{meshgrid} computed values are
 ## used.
 ##
-## Optionally, a patch handle @var{p} can be given as the last input argument
+## Optionally, a patch handle @var{hp} can be given as the last input argument
 ## to all function call variations and the vertex data will be extracted
 ## from the isosurface patch object.  Finally, if no output argument is given
-## then the colors of the patch given by the patch handle @var{p} are changed.
+## then the colors of the patch given by the patch handle @var{hp} are changed.
 ##
 ## @seealso{isosurface, isonormals}
 ## @end deftypefn
@@ -97,11 +97,11 @@
   endswitch
 
   if (isnumeric (vp) && columns (vp) == 3)
-    pa = [];
+    hp = [];
     v = vp;
   elseif (isgraphics (vp, "patch"))
-    pa = vp;
-    v = get (pa, "Vertices");
+    hp = vp;
+    v = get (hp, "Vertices");
   else
     error ("isocolors: last argument must be a vertex list or patch handle");
   endif
@@ -116,8 +116,8 @@
   endif
 
   if (nargout == 0)
-    if (! isempty (pa))
-      set (pa, "FaceVertexCData", new_colors);
+    if (! isempty (hp))
+      set (hp, "FaceVertexCData", new_colors);
     endif
   else
     cdat = new_colors;
--- a/scripts/plot/draw/isonormals.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/draw/isonormals.m	Wed Mar 30 20:40:27 2022 -0700
@@ -97,11 +97,11 @@
   endswitch
 
   if (isnumeric (vp) && columns (vp) == 3)
-    pa = [];
+    hp = [];
     v = vp;
   elseif (isgraphics (vp, "patch"))
-    pa = vp;
-    v = get (pa, "Vertices");
+    hp = vp;
+    v = get (hp, "Vertices");
   else
     error ("isonormals: input must be a list of vertices or a patch handle");
   endif
@@ -113,8 +113,8 @@
   endif
 
   if (nargout == 0)
-    if (! isempty (pa))
-      set (pa, "VertexNormals", normals);
+    if (! isempty (hp))
+      set (hp, "VertexNormals", normals);
     endif
   else
     vn = normals;
--- a/scripts/plot/draw/stairs.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/draw/stairs.m	Wed Mar 30 20:40:27 2022 -0700
@@ -71,7 +71,7 @@
 ## @seealso{bar, hist, plot, stem}
 ## @end deftypefn
 
-function [xs, ys] = stairs (varargin)
+function [xstep, ystep] = stairs (varargin)
 
   [hax, varargin, nargin] = __plt_get_axis_arg__ ("stairs", varargin{:});
 
@@ -86,7 +86,7 @@
     endif
     unwind_protect
       hax = newplot (hax);
-      [htmp, xxs, yys] = __stairs__ (true, varargin{:});
+      htmp = __stairs__ (true, varargin{:});
 
       if (! ishold ())
         set (hax, "box", "on");
@@ -98,10 +98,10 @@
       endif
     end_unwind_protect
     if (nargout == 1)
-      xs = htmp;
+      xstep = htmp;
     endif
   else
-    [~, xs, ys] = __stairs__ (false, varargin{:});
+    [~, xstep, ystep] = __stairs__ (false, varargin{:});
   endif
 
 endfunction
--- a/scripts/plot/draw/surfnorm.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/draw/surfnorm.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,7 +28,7 @@
 ## @deftypefnx {} {} surfnorm (@var{z})
 ## @deftypefnx {} {} surfnorm (@dots{}, @var{prop}, @var{val}, @dots{})
 ## @deftypefnx {} {} surfnorm (@var{hax}, @dots{})
-## @deftypefnx {} {[@var{nx}, @var{ny}, @var{nz}] =} surfnorm (@dots{})
+## @deftypefnx {} {[@var{Nx}, @var{Ny}, @var{Nz}] =} surfnorm (@dots{})
 ## Find the vectors normal to a meshgridded surface.
 ##
 ## If @var{x} and @var{y} are vectors, then a typical vertex is
@@ -48,7 +48,7 @@
 ## rather than the current axes returned by @code{gca}.
 ##
 ## If output arguments are requested then the components of the normal
-## vectors are returned in @var{nx}, @var{ny}, and @var{nz} and no plot is
+## vectors are returned in @var{Nx}, @var{Ny}, and @var{Nz} and no plot is
 ## made.  The normal vectors are unnormalized (magnitude != 1).  To normalize,
 ## use
 ##
--- a/scripts/plot/util/__actual_axis_position__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/__actual_axis_position__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} __actual_axis_position__ (@var{h})
-## @deftypefnx {} {} __actual_axis_position__ (@var{axis_struct})
+## @deftypefn  {} {@var{pos} =} __actual_axis_position__ (@var{h})
+## @deftypefnx {} {@var{pos} =} __actual_axis_position__ (@var{axis_struct})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/plot/util/__pltopt__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/__pltopt__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __pltopt__ (@var{caller}, @var{opt}, @var{err_on_invalid})
+## @deftypefn {} {[@var{options}, @var{valid}] =} __pltopt__ (@var{caller}, @var{opt}, @var{err_on_invalid})
 ##
 ## Decode plot option strings.
 ##
--- a/scripts/plot/util/close.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/close.m	Wed Mar 30 20:40:27 2022 -0700
@@ -30,6 +30,7 @@
 ## @deftypefnx {} {} close all
 ## @deftypefnx {} {} close all hidden
 ## @deftypefnx {} {} close all force
+## @deftypefnx {} {@var{status} =} close (@dots{})
 ## Close figure window(s).
 ##
 ## When called with no arguments, close the current figure.  This is equivalent
@@ -48,6 +49,9 @@
 ## even when @qcode{"closerequestfcn"} has been altered to prevent closing the
 ## window.
 ##
+## If the optional output @var{status} is requested then Octave returns 1 if
+## the figure windows were closed successfully.
+##
 ## Implementation Note: @code{close} operates by making the handle @var{h} the
 ## current figure, and then calling the function specified by the
 ## @qcode{"closerequestfcn"} property of the figure.  By default, the function
@@ -59,7 +63,7 @@
 ## @seealso{closereq, delete}
 ## @end deftypefn
 
-function retval = close (arg1, arg2)
+function status = close (arg1, arg2)
 
   figs = [];
 
@@ -122,7 +126,7 @@
   endif
 
   if (nargout > 0)
-    retval = 1;
+    status = 1;
   endif
 
 endfunction
--- a/scripts/plot/util/graphics_toolkit.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/graphics_toolkit.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {@var{name} =} graphics_toolkit ()
-## @deftypefnx {} {@var{name} =} graphics_toolkit (@var{hlist})
+## @deftypefn  {} {@var{tkit} =} graphics_toolkit ()
+## @deftypefnx {} {@var{tkit} =} graphics_toolkit (@var{hlist})
 ## @deftypefnx {} {} graphics_toolkit (@var{name})
 ## @deftypefnx {} {} graphics_toolkit (@var{hlist}, @var{name})
 ## Query or set the default graphics toolkit which is assigned to new figures.
@@ -43,19 +43,19 @@
 ## @seealso{available_graphics_toolkits}
 ## @end deftypefn
 
-function retval = graphics_toolkit (name, hlist = [])
+function tkit = graphics_toolkit (name, hlist = [])
 
   if (nargout > 0 || nargin == 0)
-    retval = get (0, "defaultfigure__graphics_toolkit__");
+    tkit = get (0, "defaultfigure__graphics_toolkit__");
     ## Handle case where graphics_toolkit has been called before any plotting
-    if (isempty (retval))
+    if (isempty (tkit))
       toolkits = available_graphics_toolkits ();
       if (any (strcmp ("qt", toolkits)))
-        retval = "qt";
+        tkit = "qt";
       elseif (any (strcmp ("fltk", toolkits)))
-        retval = "fltk";
+        tkit = "fltk";
       elseif (! isempty (toolkits))
-        retval = toolkits{1};
+        tkit = toolkits{1};
       endif
     endif
   endif
@@ -65,7 +65,7 @@
   elseif (nargin == 1)
     if (all (isfigure (name)))
       hlist = name;
-      retval = get (hlist, "__graphics_toolkit__");
+      tkit = get (hlist, "__graphics_toolkit__");
       return;
     elseif (! ischar (name))
       error ("graphics_toolkit: invalid graphics toolkit NAME");
--- a/scripts/plot/util/pan.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/pan.m	Wed Mar 30 20:40:27 2022 -0700
@@ -46,7 +46,7 @@
 ## @seealso{rotate3d, zoom}
 ## @end deftypefn
 
-function h = pan (hfig, option)
+function pan (hfig, option)
 
   ## FIXME: Presumably should implement this for Matlab compatibility.
   if (nargin == 1 && nargout > 0 && isfigure (hfig))
--- a/scripts/plot/util/print.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/print.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,7 +28,7 @@
 ## @deftypefnx {} {} print (@var{options})
 ## @deftypefnx {} {} print (@var{filename}, @var{options})
 ## @deftypefnx {} {} print (@var{hfig}, @dots{})
-## @deftypefnx {} {@var{rgb} =} print (@qcode{"-RGBImage"}, @dots{})
+## @deftypefnx {} {@var{RGB} =} print (@qcode{"-RGBImage"}, @dots{})
 ## Format a figure for printing and either save it to a file, send it to a
 ## printer, or return an RGB image.
 ##
@@ -415,7 +415,7 @@
 ## @seealso{saveas, getframe, savefig, hgsave, orient, figure}
 ## @end deftypefn
 
-function rgbout = print (varargin)
+function RGB = print (varargin)
 
   opts = __print_parse_opts__ (varargin{:});
 
@@ -754,7 +754,7 @@
       otherwise
         if (strcmp (opts.renderer, "opengl"))
           if (opts.rgb_output)
-            rgbout = __get_frame__ (opts.figure);
+            RGB = __get_frame__ (opts.figure);
           else
             compression = "none";
 
--- a/scripts/plot/util/printd.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/printd.m	Wed Mar 30 20:40:27 2022 -0700
@@ -30,7 +30,7 @@
 ## Convert any object acceptable to @code{disp} into the format selected by
 ## the suffix of @var{filename}.
 ##
-## If the return argument @var{out_file} is given, the name of the created
+## If the optional output @var{out_file} is requested, the name of the created
 ## file is returned.
 ##
 ## This function is intended to facilitate manipulation of the output of
--- a/scripts/plot/util/private/__ghostscript__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/private/__ghostscript__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __ghostscript__ (@var{@dots{}})
+## @deftypefn {} {[@var{gs_cmd}, @var{cleanup_cmd}] =} __ghostscript__ (@var{@dots{}})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/plot/util/private/__gnuplot_print__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/private/__gnuplot_print__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __gnuplot_print__ (@var{@dots{}})
+## @deftypefn {} {@var{opts} =} __gnuplot_print__ (@var{@dots{}})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/plot/util/private/__opengl_print__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/private/__opengl_print__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __opengl_print__ (@var{@dots{}})
+## @deftypefn {} {@var{opts} =} __opengl_print__ (@var{@dots{}})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/plot/util/rotate3d.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/rotate3d.m	Wed Mar 30 20:40:27 2022 -0700
@@ -41,7 +41,7 @@
 ## @seealso{pan, zoom}
 ## @end deftypefn
 
-function h = rotate3d (hfig, option)
+function rotate3d (hfig, option)
 
   ## FIXME: Presumably should implement this for Matlab compatibility.
   if (nargin == 1 && nargout > 0 && isfigure (hfig))
--- a/scripts/plot/util/subplot.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/subplot.m	Wed Mar 30 20:40:27 2022 -0700
@@ -132,7 +132,7 @@
 ## @seealso{axes, plot, gca, set}
 ## @end deftypefn
 
-function h = subplot (varargin)
+function hax = subplot (varargin)
 
   align_axes = false;
   replace_axes = false;
@@ -357,7 +357,7 @@
   end_unwind_protect
 
   if (nargout > 0)
-    h = hsubplot;
+    hax = hsubplot;
   endif
 
 endfunction
--- a/scripts/plot/util/zoom.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/plot/util/zoom.m	Wed Mar 30 20:40:27 2022 -0700
@@ -64,7 +64,7 @@
 ## Eventually we need to also support these features:
 ## @deftypefnx {} {zoom_object_handle =} zoom (@var{hfig})
 
-function h = zoom (hfig, option)
+function zoom (hfig, option)
 
   ## FIXME: Presumably should implement this for Matlab compatibility.
   if (nargin == 1 && nargout > 0 && isfigure (hfig))
--- a/scripts/polynomial/compan.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/compan.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} compan (@var{c})
+## @deftypefn {} {@var{A} =} compan (@var{c})
 ## Compute the companion matrix corresponding to polynomial coefficient vector
 ## @var{c}.
 ##
@@ -63,7 +63,7 @@
 
 function A = compan (c)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
--- a/scripts/polynomial/conv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/conv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} conv (@var{a}, @var{b})
-## @deftypefnx {} {} conv (@var{a}, @var{b}, @var{shape})
+## @deftypefn  {} {@var{y} =} conv (@var{a}, @var{b})
+## @deftypefnx {} {@var{y} =} conv (@var{a}, @var{b}, @var{shape})
 ## Convolve two vectors @var{a} and @var{b}.
 ##
 ## When @var{a} and @var{b} are the coefficient vectors of two polynomials, the
--- a/scripts/polynomial/poly.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/poly.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} poly (@var{A})
-## @deftypefnx {} {} poly (@var{x})
+## @deftypefn  {} {@var{y} =} poly (@var{A})
+## @deftypefnx {} {@var{y} =} poly (@var{x})
 ## If @var{A} is a square @math{N}-by-@math{N} matrix, @code{poly (@var{A})}
 ## is the row vector of the coefficients of @code{det (z * eye (N) - A)},
 ## the characteristic polynomial of @var{A}.
--- a/scripts/polynomial/polyaffine.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/polyaffine.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} polyaffine (@var{f}, @var{mu})
+## @deftypefn {} {@var{g} =} polyaffine (@var{f}, @var{mu})
 ## Return the coefficients of the polynomial vector @var{f} after an affine
 ## transformation.
 ##
--- a/scripts/polynomial/polyder.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/polyder.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} polyder (@var{p})
-## @deftypefnx {} {[@var{k}] =} polyder (@var{a}, @var{b})
+## @deftypefn  {} {@var{k} =} polyder (@var{p})
+## @deftypefnx {} {@var{k} =} polyder (@var{a}, @var{b})
 ## @deftypefnx {} {[@var{q}, @var{d}] =} polyder (@var{b}, @var{a})
 ## Return the coefficients of the derivative of the polynomial whose
 ## coefficients are given by the vector @var{p}.
--- a/scripts/polynomial/polyint.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/polyint.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} polyint (@var{p})
-## @deftypefnx {} {} polyint (@var{p}, @var{k})
+## @deftypefn  {} {@var{q} =} polyint (@var{p})
+## @deftypefnx {} {@var{q} =} polyint (@var{p}, @var{k})
 ## Return the coefficients of the integral of the polynomial whose
 ## coefficients are represented by the vector @var{p}.
 ##
@@ -34,7 +34,7 @@
 ## @seealso{polyder, polyval}
 ## @end deftypefn
 
-function retval = polyint (p, k)
+function q = polyint (p, k)
 
   if (nargin < 1)
     print_usage ();
@@ -53,7 +53,7 @@
   lp = length (p);
 
   if (lp == 0)
-    retval = [];
+    q = [];
     return;
   endif
 
@@ -62,7 +62,7 @@
     p = p.';
   endif
 
-  retval = [(p ./ [lp:-1:1]), k];
+  q = [(p ./ [lp:-1:1]), k];
 
 endfunction
 
--- a/scripts/polynomial/polyout.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/polyout.m	Wed Mar 30 20:40:27 2022 -0700
@@ -47,7 +47,7 @@
 ## @seealso{polyreduce}
 ## @end deftypefn
 
-function y = polyout (c, x)
+function str = polyout (c, x)
 
   if (nargin < 1)
     print_usage ();
@@ -67,26 +67,26 @@
   if (n > 0)
     n1 = n+1;
 
-    tmp = coeff (c(1));
-    for ii = 2:n
-      if (real (c(ii)) < 0)
+    s = coeff (c(1));
+    for i = 2:n
+      if (real (c(i)) < 0)
         ns = " - ";
-        c(ii) = -c(ii);
+        c(i) = -c(i);
       else
         ns = " + ";
       endif
 
-      tmp = sprintf ("%s*%s^%d%s%s", tmp, x, n1-ii, ns, coeff (c(ii)));
+      s = sprintf ("%s*%s^%d%s%s", s, x, n1-i, ns, coeff (c(i)));
 
     endfor
   else
-    tmp = " ";
+    s = " ";
   endif
 
   if (nargout == 0)
-    disp (tmp);
+    disp (s);
   else
-    y = tmp;
+    str = s;
   endif
 
 endfunction
--- a/scripts/polynomial/polyreduce.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/polyreduce.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} polyreduce (@var{c})
+## @deftypefn {} {@var{p} =} polyreduce (@var{c})
 ## Reduce a polynomial coefficient vector to a minimum number of terms by
 ## stripping off any leading zeros.
 ## @seealso{polyout}
--- a/scripts/polynomial/polyvalm.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/polyvalm.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} polyvalm (@var{c}, @var{x})
+## @deftypefn {} {@var{y} =} polyvalm (@var{c}, @var{x})
 ## Evaluate a polynomial in the matrix sense.
 ##
 ## @code{polyvalm (@var{c}, @var{x})} will evaluate the polynomial in the
--- a/scripts/polynomial/roots.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/polynomial/roots.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} roots (@var{c})
+## @deftypefn {} {@var{r} =} roots (@var{c})
 ##
 ## Compute the roots of the polynomial @var{c}.
 ##
--- a/scripts/prefs/prefdir.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/prefs/prefdir.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} prefdir
-## @deftypefnx {} {} prefdir (1)
-## @deftypefnx {} {@var{dir} =} prefdir
+## @deftypefn  {} {@var{dir} =} prefdir
+## @deftypefnx {} {@var{dir} =} prefdir (1)
 ## Return the directory that holds the preferences for Octave.
 ##
 ## Examples:
--- a/scripts/prefs/private/prefsfile.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/prefs/private/prefsfile.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,12 +24,12 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} prefsfile ()
+## @deftypefn {} {@var{fname} =} prefsfile ()
 ## Return the full path and name of the file containing Octave preferences.
 ## @end deftypefn
 
-function retval = prefsfile ()
+function fname = prefsfile ()
 
-  retval = [prefdir() filesep() ".octave_prefs"];
+  fname = [prefdir() filesep() ".octave_prefs"];
 
 endfunction
--- a/scripts/profiler/profexplore.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/profiler/profexplore.m	Wed Mar 30 20:40:27 2022 -0700
@@ -36,13 +36,10 @@
 ## @seealso{profile, profshow}
 ## @end deftypefn
 
-## Built-in profiler.
 function profexplore (data)
 
   if (nargin == 0)
     data = profile ("info");
-  elseif (nargin < 1)
-    print_usage ();
   endif
 
   ## The actual work is done by a recursive worker function, since that
--- a/scripts/profiler/profexport.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/profiler/profexport.m	Wed Mar 30 20:40:27 2022 -0700
@@ -44,7 +44,6 @@
 ## @seealso{profshow, profexplore, profile}
 ## @end deftypefn
 
-## Built-in profiler.
 function profexport (dir, name = "", data)
 
   if (nargin < 1)
--- a/scripts/profiler/profshow.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/profiler/profshow.m	Wed Mar 30 20:40:27 2022 -0700
@@ -43,7 +43,6 @@
 ## @seealso{profexplore, profile}
 ## @end deftypefn
 
-## Built-in profiler.
 function profshow (data, n = 20)
 
   if (nargin == 0)
--- a/scripts/set/powerset.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/set/powerset.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} powerset (@var{a})
-## @deftypefnx {} {} powerset (@var{a}, "rows")
+## @deftypefn  {} {@var{p} =} powerset (@var{a})
+## @deftypefnx {} {@var{p} =} powerset (@var{a}, "rows")
 ## Compute the powerset (all subsets) of the set @var{a}.
 ##
 ## The set @var{a} must be a numerical matrix or a cell array of strings.  The
--- a/scripts/set/unique.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/set/unique.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} unique (@var{x})
-## @deftypefnx {} {} unique (@var{x}, "rows")
-## @deftypefnx {} {} unique (@dots{}, "sorted")
-## @deftypefnx {} {} unique (@dots{}, "stable")
+## @deftypefn  {} {@var{y} =} unique (@var{x})
+## @deftypefnx {} {@var{y} =} unique (@var{x}, "rows")
+## @deftypefnx {} {@var{y} =} unique (@dots{}, "sorted")
+## @deftypefnx {} {@var{y} =} unique (@dots{}, "stable")
 ## @deftypefnx {} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{})
 ## @deftypefnx {} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{}, "first")
 ## @deftypefnx {} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{}, "last")
--- a/scripts/signal/arch_rnd.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/arch_rnd.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} arch_rnd (@var{a}, @var{b}, @var{t})
+## @deftypefn {} {@var{y} =} arch_rnd (@var{a}, @var{b}, @var{t})
 ## Simulate an ARCH sequence of length @var{t} with AR coefficients @var{b} and
 ## CH coefficients @var{a}.
 ##
--- a/scripts/signal/arma_rnd.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/arma_rnd.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} arma_rnd (@var{a}, @var{b}, @var{v}, @var{t}, @var{n})
+## @deftypefn {} {@var{x} =} arma_rnd (@var{a}, @var{b}, @var{v}, @var{t}, @var{n})
 ## Return a simulation of the ARMA model.
 ##
 ## The ARMA model is defined by
--- a/scripts/signal/autoreg_matrix.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/autoreg_matrix.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} autoreg_matrix (@var{y}, @var{k})
+## @deftypefn {} {@var{x} =} autoreg_matrix (@var{y}, @var{k})
 ## Given a time series (vector) @var{y}, return a matrix with ones in the first
 ## column and the first @var{k} lagged values of @var{y} in the other columns.
 ##
@@ -35,7 +35,7 @@
 ## The resulting matrix may be used as a regressor matrix in autoregressions.
 ## @end deftypefn
 
-function X = autoreg_matrix (y, k)
+function x = autoreg_matrix (y, k)
 
   if (nargin != 2)
     print_usage ();
@@ -47,9 +47,9 @@
 
   T = length (y);
   y = reshape (y, T, 1);
-  X = ones (T, k+1);
+  x = ones (T, k+1);
   for j = 1 : k
-    X(:, j+1) = [(zeros (j, 1)); y(1:T-j)];
+    x(:, j+1) = [(zeros (j, 1)); y(1:T-j)];
   endfor
 
 endfunction
--- a/scripts/signal/bartlett.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/bartlett.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} bartlett (@var{m})
+## @deftypefn {} {@var{c} =} bartlett (@var{m})
 ## Return the filter coefficients of a Bartlett (triangular) window of length
 ## @var{m}.
 ##
@@ -35,11 +35,11 @@
 
 function c = bartlett (m)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
-  if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
+  if (! (isscalar (m) && m > 0 && m == fix (m)))
     error ("bartlett: M must be a positive integer");
   endif
 
--- a/scripts/signal/blackman.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/blackman.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} blackman (@var{m})
-## @deftypefnx {} {} blackman (@var{m}, "periodic")
-## @deftypefnx {} {} blackman (@var{m}, "symmetric")
+## @deftypefn  {} {@var{c} =} blackman (@var{m})
+## @deftypefnx {} {@var{c} =} blackman (@var{m}, "periodic")
+## @deftypefnx {} {@var{c} =} blackman (@var{m}, "symmetric")
 ## Return the filter coefficients of a @nospell{Blackman} window of length
 ## @var{m}.
 ##
@@ -46,7 +46,7 @@
     print_usage ();
   endif
 
-  if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
+  if (! (isscalar (m) && m > 0 && m == fix (m)))
     error ("blackman: M must be a positive integer");
   endif
 
--- a/scripts/signal/detrend.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/detrend.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} detrend (@var{x}, @var{p})
+## @deftypefn {} {@var{y} =} detrend (@var{x}, @var{p})
 ## If @var{x} is a vector, @code{detrend (@var{x}, @var{p})} removes the
 ## best fit of a polynomial of order @var{p} from the data @var{x}.
 ##
@@ -55,7 +55,7 @@
   elseif (ischar (p) && strcmpi (p, "linear"))
     p = 1;
   elseif (! isscalar (p) || p < 0 || p != fix (p))
-    error ("detrend: P must be \"constant\", \"linear\", or a positive integer");
+    error ('detrend: P must be "constant", "linear", or a positive integer');
   endif
 
   [m, n] = size (x);
@@ -107,4 +107,3 @@
 %!error detrend (1, "invalid")
 %!error detrend (1, -1)
 %!error detrend (1, 1.25)
-
--- a/scripts/signal/durbinlevinson.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/durbinlevinson.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} durbinlevinson (@var{c}, @var{oldphi}, @var{oldv})
+## @deftypefn {} {[@var{newphi}, @var{newv}] =} durbinlevinson (@var{c}, @var{oldphi}, @var{oldv})
 ## Perform one step of the @nospell{Durbin-Levinson} algorithm.
 ##
 ## The vector @var{c} specifies the autocovariances
--- a/scripts/signal/fftconv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/fftconv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fftconv (@var{x}, @var{y})
-## @deftypefnx {} {} fftconv (@var{x}, @var{y}, @var{n})
+## @deftypefn  {} {@var{c} =} fftconv (@var{x}, @var{y})
+## @deftypefnx {} {@var{c} =} fftconv (@var{x}, @var{y}, @var{n})
 ## Convolve two vectors using the FFT for computation.
 ##
 ## @code{c = fftconv (@var{x}, @var{y})} returns a vector of length equal to
--- a/scripts/signal/fftfilt.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/fftfilt.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fftfilt (@var{b}, @var{x})
-## @deftypefnx {} {} fftfilt (@var{b}, @var{x}, @var{n})
+## @deftypefn  {} {@var{y} =} fftfilt (@var{b}, @var{x})
+## @deftypefnx {} {@var{y} =} fftfilt (@var{b}, @var{x}, @var{n})
 ## Filter @var{x} with the FIR filter @var{b} using the FFT.
 ##
 ## If @var{x} is a matrix, filter each column of the matrix.
--- a/scripts/signal/fftshift.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/fftshift.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fftshift (@var{x})
-## @deftypefnx {} {} fftshift (@var{x}, @var{dim})
+## @deftypefn  {} {@var{y} =} fftshift (@var{x})
+## @deftypefnx {} {@var{y} =} fftshift (@var{x}, @var{dim})
 ## Perform a shift of the vector @var{x}, for use with the @code{fft} and
 ## @code{ifft} functions, in order to move the frequency 0 to the center of
 ## the vector or matrix.
@@ -49,7 +49,7 @@
 ## @seealso{ifftshift}
 ## @end deftypefn
 
-function retval = fftshift (x, dim)
+function y = fftshift (x, dim)
 
   if (nargin < 1)
     print_usage ();
@@ -69,12 +69,12 @@
     idx = cell ();
     idx = repmat ({':'}, nd, 1);
     idx{dim} = [sz2+1:sz(dim), 1:sz2];
-    retval = x(idx{:});
+    y = x(idx{:});
   else
     if (isvector (x))
       xl = length (x);
       xx = ceil (xl/2);
-      retval = x([xx+1:xl, 1:xx]);
+      y = x([xx+1:xl, 1:xx]);
     else
       nd = ndims (x);
       sz = size (x);
@@ -83,7 +83,7 @@
       for i = 1:nd
         idx{i} = [sz2(i)+1:sz(i), 1:sz2(i)];
       endfor
-      retval = x(idx{:});
+      y = x(idx{:});
     endif
   endif
 
--- a/scripts/signal/fractdiff.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/fractdiff.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} fractdiff (@var{x}, @var{d})
+## @deftypefn {} {@var{fd} =} fractdiff (@var{x}, @var{d})
 ## Compute the fractional differences @math{(1-L)^d x} where @math{L}
 ## denotes the lag-operator and @math{d} is greater than -1.
 ## @end deftypefn
--- a/scripts/signal/hamming.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/hamming.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} hamming (@var{m})
-## @deftypefnx {} {} hamming (@var{m}, "periodic")
-## @deftypefnx {} {} hamming (@var{m}, "symmetric")
+## @deftypefn  {} {@var{c} =} hamming (@var{m})
+## @deftypefnx {} {@var{c} =} hamming (@var{m}, "periodic")
+## @deftypefnx {} {@var{c} =} hamming (@var{m}, "symmetric")
 ## Return the filter coefficients of a Hamming window of length @var{m}.
 ##
 ## If the optional argument @qcode{"periodic"} is given, the periodic form
@@ -45,7 +45,7 @@
     print_usage ();
   endif
 
-  if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
+  if (! (isscalar (m) && m > 0 && m == fix (m)))
     error ("hamming: M must be a positive integer");
   endif
 
--- a/scripts/signal/hanning.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/hanning.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} hanning (@var{m})
-## @deftypefnx {} {} hanning (@var{m}, "periodic")
-## @deftypefnx {} {} hanning (@var{m}, "symmetric")
+## @deftypefn  {} {@var{c} =} hanning (@var{m})
+## @deftypefnx {} {@var{c} =} hanning (@var{m}, "periodic")
+## @deftypefnx {} {@var{c} =} hanning (@var{m}, "symmetric")
 ## Return the filter coefficients of a Hanning window of length @var{m}.
 ##
 ## If the optional argument @qcode{"periodic"} is given, the periodic form
@@ -45,7 +45,7 @@
     print_usage ();
   endif
 
-  if (! (isscalar (m) && (m == fix (m)) && (m > 0)))
+  if (! (isscalar (m) && m > 0 && m == fix (m)))
     error ("hanning: M must be a positive integer");
   endif
 
--- a/scripts/signal/hurst.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/hurst.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} hurst (@var{x})
+## @deftypefn {} {@var{H} =} hurst (@var{x})
 ## Estimate the Hurst parameter of sample @var{x} via the rescaled range
 ## statistic.
 ##
@@ -33,14 +33,14 @@
 
 function H = hurst (x)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
   if (isscalar (x))
     error ("hurst: X must not be a scalar");
   elseif (isvector (x))
-    x = reshape (x, length (x), 1);
+    x = x(:);  # always use column vector
   endif
 
   [xr, xc] = size (x);
--- a/scripts/signal/ifftshift.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/ifftshift.m	Wed Mar 30 20:40:27 2022 -0700
@@ -33,40 +33,40 @@
 ## @seealso{fftshift}
 ## @end deftypefn
 
-function retval = ifftshift (x, dim)
+function x = ifftshift (y, dim)
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  if (! (isnumeric (x) || islogical (x) || ischar (x)))
-    error ("ifftshift: X must be a vector or matrix");
+  if (! (isnumeric (y) || islogical (y) || ischar (y)))
+    error ("ifftshift: Y must be a vector or matrix");
   endif
 
   if (nargin == 2)
     if (! (isscalar (dim) && dim > 0 && dim == fix (dim)))
       error ("ifftshift: dimension DIM must be a positive integer");
     endif
-    nd = ndims (x);
-    sz = size (x);
+    nd = ndims (y);
+    sz = size (y);
     sz2 = floor (sz(dim) / 2);
     idx = repmat ({':'}, nd, 1);
     idx{dim} = [sz2+1:sz(dim), 1:sz2];
-    retval = x(idx{:});
+    x = y(idx{:});
   else
-    if (isvector (x))
-      xl = length (x);
-      xx = floor (xl/2);
-      retval = x([xx+1:xl, 1:xx]);
+    if (isvector (y))
+      yl = length (y);
+      y2 = floor (yl/2);
+      x = y([y2+1:yl, 1:y2]);
     else
-      nd = ndims (x);
-      sz = size (x);
+      nd = ndims (y);
+      sz = size (y);
       sz2 = floor (sz ./ 2);
       idx = cell ();
       for i = 1:nd
         idx{i} = [sz2(i)+1:sz(i), 1:sz2(i)];
       endfor
-      retval = x(idx{:});
+      x = y(idx{:});
     endif
   endif
 
--- a/scripts/signal/private/rectangle_lw.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/private/rectangle_lw.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,16 +24,18 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} rectangle_lw (@var{n}, @var{b})
-## Rectangular lag window.  Subfunction used for spectral density
-## estimation.
+## @deftypefn {} {@var{c} =} rectangle_lw (@var{n}, @var{b})
+## Rectangular lag window.
+##
+## Subfunction used for spectral density estimation.
+## @seealso{spectral_adf}
 ## @end deftypefn
 
-function retval = rectangle_lw (n, b)
+function c = rectangle_lw (n, b)
 
-  retval = zeros (n, 1);
+  c = zeros (n, 1);
   t = floor (1 / b);
 
-  retval(1:t, 1) = ones (t, 1);
+  c(1:t) = 1;
 
 endfunction
--- a/scripts/signal/private/rectangle_sw.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/private/rectangle_sw.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,19 +24,21 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} rectangle_sw (@var{n}, @var{b})
-## Rectangular spectral window.  Subfunction used for spectral density
-## estimation.
+## @deftypefn {} {@var{c} =} rectangle_sw (@var{n}, @var{b})
+## Rectangular spectral window.
+##
+## Subfunction used for spectral density estimation.
+## @seealso{spectral_xdf}
 ## @end deftypefn
 
-function retval = rectangle_sw (n, b)
+function c = rectangle_sw (n, b)
 
-  retval = zeros (n, 1);
-  retval(1) = 2 / b + 1;
+  c = zeros (n, 1);
+  c(1) = 2 / b + 1;
 
   l = (2:n)' - 1;
   l = 2 * pi * l / n;
 
-  retval(2:n) = sin ((2/b + 1) * l / 2) ./ sin (l / 2);
+  c(2:n) = sin ((2/b + 1) * l / 2) ./ sin (l / 2);
 
 endfunction
--- a/scripts/signal/private/triangle_lw.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/private/triangle_lw.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,14 +24,16 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} triangle_lw (@var{n}, @var{b})
-## Triangular lag window.  Subfunction used for spectral density
-## estimation.
+## @deftypefn {} {@var{c} =} triangle_lw (@var{n}, @var{b})
+## Triangular lag window.
+##
+## Subfunction used for spectral density estimation.
+## @seealso{spectral_adf}
 ## @end deftypefn
 
-function retval = triangle_lw (n, b)
+function c = triangle_lw (n, b)
 
-  retval = 1 - (0 : n-1)' * b;
-  retval = max ([retval'; (zeros (1, n))])';
+  c = 1 - (0 : n-1)' * b;
+  c = max ([c'; (zeros (1, n))])';
 
 endfunction
--- a/scripts/signal/sinc.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/sinc.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} sinc (@var{x})
+## @deftypefn {} {@var{y} =} sinc (@var{x})
 ## Compute the sinc function.
 ##
 ## Return
@@ -36,19 +36,19 @@
 ## @end ifnottex
 ## @end deftypefn
 
-function result = sinc (x)
+function y = sinc (x)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
-  result = ones (size (x));
+  y = ones (size (x));
 
   i = (x != 0);
 
   if (any (i(:)))
     t = pi * x(i);
-    result(i) = sin (t) ./ t;
+    y(i) = sin (t) ./ t;
   endif
 
 endfunction
--- a/scripts/signal/sinetone.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/sinetone.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} sinetone (@var{freq}, @var{rate}, @var{sec}, @var{ampl})
+## @deftypefn {} {@var{y} =} sinetone (@var{freq}, @var{rate}, @var{sec}, @var{ampl})
 ## Return a sinetone of frequency @var{freq} with a length of @var{sec}
 ## seconds at sampling rate @var{rate} and with amplitude @var{ampl}.
 ##
@@ -34,7 +34,7 @@
 ## @seealso{sinewave}
 ## @end deftypefn
 
-function retval = sinetone (freq, rate = 8000, sec = 1, ampl = 64)
+function y = sinetone (freq, rate = 8000, sec = 1, ampl = 64)
 
   if (nargin < 1)
     print_usage ();
@@ -52,10 +52,10 @@
   n = length (freq);
   ns = round (rate * sec);
 
-  retval = zeros (ns, n);
+  y = zeros (ns, n);
 
   for k = 1:n
-    retval(:, k) = ampl(k) * sin (2 * pi * (1:ns) / rate * freq(k))';
+    y(:, k) = ampl(k) * sin (2 * pi * (1:ns) / rate * freq(k))';
   endfor
 
 endfunction
--- a/scripts/signal/sinewave.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/sinewave.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} sinewave (@var{m}, @var{n}, @var{d})
+## @deftypefn {} {@var{y} =} sinewave (@var{m}, @var{n}, @var{d})
 ## Return an @var{m}-element vector with @var{i}-th element given by
 ## @code{sin (2 * pi * (@var{i}+@var{d}-1) / @var{n})}.
 ##
@@ -33,7 +33,7 @@
 ## @seealso{sinetone}
 ## @end deftypefn
 
-function x = sinewave (m, n, d = 0)
+function y = sinewave (m, n, d = 0)
 
   if (nargin < 1)
     print_usage ();
@@ -47,7 +47,7 @@
     d = 0;
   endif
 
-  x = sin (((1 : m) + d - 1) * 2 * pi / n);
+  y = sin (((1 : m) + d - 1) * 2 * pi / n);
 
 endfunction
 
--- a/scripts/signal/spectral_adf.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/spectral_adf.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} spectral_adf (@var{c})
-## @deftypefnx {} {} spectral_adf (@var{c}, @var{win})
-## @deftypefnx {} {} spectral_adf (@var{c}, @var{win}, @var{b})
+## @deftypefn  {} {@var{sde} =} spectral_adf (@var{c})
+## @deftypefnx {} {@var{sde} =} spectral_adf (@var{c}, @var{win})
+## @deftypefnx {} {@var{sde} =} spectral_adf (@var{c}, @var{win}, @var{b})
 ## Return the spectral density estimator given a vector of autocovariances
 ## @var{c}, window name @var{win}, and bandwidth, @var{b}.
 ##
@@ -39,7 +39,7 @@
 ## @seealso{spectral_xdf}
 ## @end deftypefn
 
-function retval = spectral_adf (c, win, b)
+function sde = spectral_adf (c, win, b)
 
   if (nargin < 1)
     print_usage ();
@@ -66,9 +66,9 @@
 
   c .*= w;
 
-  retval = 2 * real (fft (c)) - c(1);
-  retval = [(zeros (cr, 1)), retval];
-  retval(:, 1) = (0 : cr-1)' / cr;
+  sde = 2 * real (fft (c)) - c(1);
+  sde = [(zeros (cr, 1)), sde];
+  sde(:, 1) = (0 : cr-1)' / cr;
 
 endfunction
 
--- a/scripts/signal/spectral_xdf.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/spectral_xdf.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} spectral_xdf (@var{x})
-## @deftypefnx {} {} spectral_xdf (@var{x}, @var{win})
-## @deftypefnx {} {} spectral_xdf (@var{x}, @var{win}, @var{b})
+## @deftypefn  {} {@var{sde} =} spectral_xdf (@var{x})
+## @deftypefnx {} {@var{sde} =} spectral_xdf (@var{x}, @var{win})
+## @deftypefnx {} {@var{sde} =} spectral_xdf (@var{x}, @var{win}, @var{b})
 ## Return the spectral density estimator given a data vector @var{x}, window
 ## name @var{win}, and bandwidth, @var{b}.
 ##
@@ -39,7 +39,7 @@
 ## @seealso{spectral_adf}
 ## @end deftypefn
 
-function retval = spectral_xdf (x, win, b)
+function sde = spectral_xdf (x, win, b)
 
   if (nargin < 1)
     print_usage ();
@@ -66,11 +66,11 @@
 
   x -= sum (x) / xr;
 
-  retval = (abs (fft (x)) / xr).^2;
-  retval = real (ifft (fft (retval) .* fft (w)));
+  sde = (abs (fft (x)) / xr).^2;
+  sde = real (ifft (fft (sde) .* fft (w)));
 
-  retval = [(zeros (xr, 1)), retval];
-  retval(:, 1) = (0 : xr-1)' / xr;
+  sde = [(zeros (xr, 1)), sde];
+  sde(:, 1) = (0 : xr-1)' / xr;
 
 endfunction
 
--- a/scripts/signal/spencer.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/signal/spencer.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,14 +24,14 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} spencer (@var{x})
+## @deftypefn {} {@var{savg} =} spencer (@var{x})
 ## Return @nospell{Spencer's} 15-point moving average of each column of
 ## @var{x}.
 ## @end deftypefn
 
-function retval = spencer (x)
+function savg = spencer (x)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
@@ -48,9 +48,9 @@
 
   w = [-3, -6, -5, 3, 21, 46, 67, 74, 67, 46, 21, 3, -5, -6, -3] / 320;
 
-  retval = fftfilt (w, x);
-  retval = [zeros(7,c); retval(15:n,:); zeros(7,c);];
+  savg = fftfilt (w, x);
+  savg = [zeros(7,c); savg(15:n,:); zeros(7,c);];
 
-  retval = reshape (retval, xr, xc);
+  savg = reshape (savg, xr, xc);
 
 endfunction
--- a/scripts/sparse/ilu.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/sparse/ilu.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} ilu (@var{A})
-## @deftypefnx {} {} ilu (@var{A}, @var{opts})
+## @deftypefn  {} {@var{LUA} =} ilu (@var{A})
+## @deftypefnx {} {@var{LUA} =} ilu (@var{A}, @var{opts})
 ## @deftypefnx {} {[@var{L}, @var{U}] =} ilu (@dots{})
 ## @deftypefnx {} {[@var{L}, @var{U}, @var{P}] =} ilu (@dots{})
 ##
--- a/scripts/sparse/private/__sprand__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/sparse/private/__sprand__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,9 +27,9 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} __sprand__ (@var{s}, @var{randfun})
-## @deftypefnx {} {} __sprand__ (@var{m}, @var{n}, @var{d}, @var{fcnname}, @var{randfun})
-## @deftypefnx {} {} __sprand__ (@var{m}, @var{n}, @var{d}, @var{rc}, @var{fcnname}, @var{randfun})
+## @deftypefn  {} {@var{S} =} __sprand__ (@var{s}, @var{randfun})
+## @deftypefnx {} {@var{S} =} __sprand__ (@var{m}, @var{n}, @var{d}, @var{fcnname}, @var{randfun})
+## @deftypefnx {} {@var{S} =} __sprand__ (@var{m}, @var{n}, @var{d}, @var{rc}, @var{fcnname}, @var{randfun})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/sparse/sprand.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/sparse/sprand.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,9 +27,9 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} sprand (@var{m}, @var{n}, @var{d})
-## @deftypefnx {} {} sprand (@var{m}, @var{n}, @var{d}, @var{rc})
-## @deftypefnx {} {} sprand (@var{s})
+## @deftypefn  {} {@var{s} =} sprand (@var{m}, @var{n}, @var{d})
+## @deftypefnx {} {@var{s} =} sprand (@var{m}, @var{n}, @var{d}, @var{rc})
+## @deftypefnx {} {@var{s} =} sprand (@var{s})
 ## Generate a sparse matrix with uniformly distributed random values.
 ##
 ## The size of the matrix is @var{m}x@var{n} with a density of values @var{d}.
--- a/scripts/sparse/sprandn.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/sparse/sprandn.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,9 +27,9 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} sprandn (@var{m}, @var{n}, @var{d})
-## @deftypefnx {} {} sprandn (@var{m}, @var{n}, @var{d}, @var{rc})
-## @deftypefnx {} {} sprandn (@var{s})
+## @deftypefn  {} {@var{s} =} sprandn (@var{m}, @var{n}, @var{d})
+## @deftypefnx {} {@var{s} =} sprandn (@var{m}, @var{n}, @var{d}, @var{rc})
+## @deftypefnx {} {@var{s} =} sprandn (@var{s})
 ## Generate a sparse matrix with normally distributed random values.
 ##
 ## The size of the matrix is @var{m}x@var{n} with a density of values @var{d}.
--- a/scripts/sparse/sprandsym.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/sparse/sprandsym.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} sprandsym (@var{n}, @var{d})
-## @deftypefnx {} {} sprandsym (@var{s})
+## @deftypefn  {} {@var{S} =} sprandsym (@var{n}, @var{d})
+## @deftypefnx {} {@var{S} =} sprandsym (@var{s})
 ## Generate a symmetric random sparse matrix.
 ##
 ## The size of the matrix will be @var{n}x@var{n}, with a density of values
--- a/scripts/sparse/treelayout.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/sparse/treelayout.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,21 +24,21 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} treelayout (@var{tree})
-## @deftypefnx {} {} treelayout (@var{tree}, @var{permutation})
+## @deftypefn  {} {[@var{x}, @var{y}] =} treelayout (@var{tree})
+## @deftypefnx {} {[@var{x}, @var{y}] =} treelayout (@var{tree}, @var{permutation})
+## @deftypefnx {} {[@var{x}, @var{y}, @var{h}, @var{s}] =} treelayout (@dots{})
 ## treelayout lays out a tree or a forest.
 ##
 ## The first argument @var{tree} is a vector of predecessors.
 ##
-## The parameter @var{permutation} is an optional postorder permutation.
+## The optional parameter @var{permutation} is a postorder permutation.
 ##
 ## The complexity of the algorithm is O(n) in terms of time and memory
 ## requirements.
 ## @seealso{etreeplot, gplot, treeplot}
 ## @end deftypefn
 
-function [x_coordinate, y_coordinate, height, s] = ...
-                                                 treelayout (tree, permutation)
+function [x, y, h, s] = treelayout (tree, permutation)
 
   if (nargin < 1)
     print_usage ();
@@ -162,7 +162,7 @@
     ## If there is not any descendant of "parent node":
     if (stk(end,2) != par_number)
      left_most += 1;
-     x_coordinate_r(par_number) = left_most;
+     x_r(par_number) = left_most;
      max_ht = min (max_ht, level);
      if (length (stk) > 1 && find ((circshift (stk,1) - stk) == 0) > 1
          && stk(end,2) != stk(end-1,2))
@@ -181,7 +181,7 @@
 
         ## The level have to be decreased.
 
-        x_coordinate_r(par_number_vec) = left_most;
+        x_r(par_number_vec) = left_most;
         stk(position:end,:) = [];
       endif
 
@@ -192,8 +192,8 @@
       par_number = stk(end,1);
       ## If there is another branch start to search it.
       if (par_number != -1)
-        y_coordinate(par_number) = level;
-        x_coordinate_l(par_number) = left_most + 1;
+        y(par_number) = level;
+        x_l(par_number) = left_most + 1;
       endif
     else
 
@@ -201,16 +201,16 @@
       ## them and go on through it.
       level -= 1;
       par_number = stk(end,1);
-      y_coordinate(par_number) = level;
-      x_coordinate_l(par_number) = left_most + 1;
+      y(par_number) = level;
+      x_l(par_number) = left_most + 1;
     endif
   endwhile
 
   ## Calculate the x coordinates (the known values are the position
   ## of most left and most right descendants).
-  x_coordinate = (x_coordinate_l + x_coordinate_r) / 2;
+  x = (x_l + x_r) / 2;
 
-  height = num_nodes - max_ht - 1;
+  h = num_nodes - max_ht - 1;
 
 endfunction
 
--- a/scripts/specfun/beta.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/beta.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} beta (@var{a}, @var{b})
+## @deftypefn {} {@var{y} =} beta (@var{a}, @var{b})
 ## Compute the Beta function for real inputs @var{a} and @var{b}.
 ##
 ## The Beta function definition is
@@ -48,7 +48,7 @@
 ## @seealso{betaln, betainc, betaincinv}
 ## @end deftypefn
 
-function retval = beta (a, b)
+function y = beta (a, b)
 
   if (nargin != 2)
     print_usage ();
@@ -60,7 +60,7 @@
     error ("beta: A and B must have consistent sizes");
   endif
 
-  retval = real (exp (gammaln (a) + gammaln (b) - gammaln (a+b)));
+  y = real (exp (gammaln (a) + gammaln (b) - gammaln (a+b)));
 
 endfunction
 
--- a/scripts/specfun/betainc.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/betainc.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} betainc (@var{x}, @var{a}, @var{b})
-## @deftypefnx {} {} betainc (@var{x}, @var{a}, @var{b}, @var{tail})
+## @deftypefn  {} {@var{I} =} betainc (@var{x}, @var{a}, @var{b})
+## @deftypefnx {} {@var{I} =} betainc (@var{x}, @var{a}, @var{b}, @var{tail})
 ## Compute the incomplete beta function.
 ##
 ## This is defined as
@@ -72,7 +72,7 @@
 ## @seealso{beta, betaincinv, betaln}
 ## @end deftypefn
 
-function y = betainc (x, a, b, tail = "lower")
+function I = betainc (x, a, b, tail = "lower")
 
   if (nargin < 3)
     print_usage ();
@@ -115,7 +115,7 @@
 
   ## Convert to floating point if necessary
   if (isinteger (x))
-    y = double (x);
+    I = double (x);
   endif
   if (isinteger (a))
     a = double (a);
@@ -125,7 +125,7 @@
   endif
 
   ## Initialize output array
-  y = zeros (size (x), class (x));
+  I = zeros (size (x), class (x));
 
   ## Trivial cases (long code here trades memory for speed)
   a_one = (a == 1);
@@ -138,13 +138,13 @@
   b_one &= a_not_one;
 
   if (strcmpi (tail, "lower"))
-    y(a_b_one) = x(a_b_one);
-    y(a_one) = 1 - (1 - x(a_one)) .^ b(a_one);
-    y(b_one) = x(b_one) .^ a(b_one);
+    I(a_b_one) = x(a_b_one);
+    I(a_one) = 1 - (1 - x(a_one)) .^ b(a_one);
+    I(b_one) = x(b_one) .^ a(b_one);
   elseif (strcmpi (tail, "upper"))
-    y(a_b_one) = 1 - x(a_b_one);
-    y(a_one) = (1 - x(a_one)) .^ b(a_one);
-    y(b_one) = 1 - x(b_one) .^ a(b_one);
+    I(a_b_one) = 1 - x(a_b_one);
+    I(a_one) = (1 - x(a_one)) .^ b(a_one);
+    I(b_one) = 1 - x(b_one) .^ a(b_one);
   endif
 
   ## Non-Trivial cases
@@ -183,10 +183,10 @@
   y_nt = real (exp (y_nt));
   y_nt(fflag) = 1 - y_nt(fflag);
 
-  y(non_trivial) = y_nt;
+  I(non_trivial) = y_nt;
 
   ## Restore original shape
-  y = reshape (y, orig_sz);
+  I = reshape (I, orig_sz);
 
 endfunction
 
--- a/scripts/specfun/betaincinv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/betaincinv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} betaincinv (@var{y}, @var{a}, @var{b})
-## @deftypefnx {} {} betaincinv (@var{y}, @var{a}, @var{b}, "lower")
-## @deftypefnx {} {} betaincinv (@var{y}, @var{a}, @var{b}, "upper")
+## @deftypefn  {} {@var{x} =} betaincinv (@var{y}, @var{a}, @var{b})
+## @deftypefnx {} {@var{x} =} betaincinv (@var{y}, @var{a}, @var{b}, "lower")
+## @deftypefnx {} {@var{x} =} betaincinv (@var{y}, @var{a}, @var{b}, "upper")
 ## Compute the inverse of the normalized incomplete beta function.
 ##
 ## The normalized incomplete beta function is defined as
--- a/scripts/specfun/betaln.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/betaln.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} betaln (@var{a}, @var{b})
+## @deftypefn {} {@var{lnb} =} betaln (@var{a}, @var{b})
 ## Compute the natural logarithm of the Beta function for real inputs @var{a}
 ## and @var{b}.
 ##
@@ -48,7 +48,7 @@
 ## @seealso{beta, betainc, betaincinv, gammaln}
 ## @end deftypefn
 
-function retval = betaln (a, b)
+function lnb = betaln (a, b)
 
   if (nargin != 2)
     print_usage ();
@@ -60,7 +60,7 @@
     error ("betaln: A and B must have consistent sizes");
   endif
 
-  retval = gammaln (a) + gammaln (b) - gammaln (a + b);
+  lnb = gammaln (a) + gammaln (b) - gammaln (a + b);
 
 endfunction
 
--- a/scripts/specfun/cosint.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/cosint.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} cosint (@var{x})
+## @deftypefn {} {@var{y} =} cosint (@var{x})
 ## Compute the cosine integral function:
 ## @tex
 ## $$
@@ -76,7 +76,7 @@
 
 function y = cosint (x)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
--- a/scripts/specfun/expint.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/expint.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} expint (@var{x})
+## @deftypefn {} {@var{y} =} expint (@var{x})
 ## Compute the exponential integral.
 ##
 ## The exponential integral is defined as:
--- a/scripts/specfun/factorial.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/factorial.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,12 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} factorial (@var{n})
+## @deftypefn {} {@var{f} =} factorial (@var{n})
 ## Return the factorial of @var{n} where @var{n} is a real non-negative
 ## integer.
 ##
+## @c FIXME: This documentation is wrong.  Apparently gamma() is used for
+## @c        calculations rather than prod().
 ## If @var{n} is a scalar, this is equivalent to @code{prod (1:@var{n})}.  For
 ## vector or matrix arguments, return the factorial of each element in the
 ## array.
@@ -39,7 +41,7 @@
 ## @seealso{prod, gamma, gammaln}
 ## @end deftypefn
 
-function x = factorial (n)
+function f = factorial (n)
 
   if (nargin < 1)
     print_usage ();
@@ -47,14 +49,14 @@
     error ("factorial: all N must be real non-negative integers");
   endif
 
-  x = round (gamma (n+1));
+  f = round (gamma (n+1));
 
   ## FIXME: Matlab returns an output of the same type as the input.
   ## This doesn't seem particularly worth copying--for example uint8 would
   ## saturate for n > 5.  If desired, however, the following code could be
   ## uncommented.
-  ## if (! isfloat (x))
-  ##   x = cast (x, class (n));
+  ## if (! isfloat (f))
+  ##   f = cast (f, class (n));
   ## endif
 
 endfunction
--- a/scripts/specfun/gammainc.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/gammainc.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} gammainc (@var{x}, @var{a})
-## @deftypefnx {} {} gammainc (@var{x}, @var{a}, @var{tail})
+## @deftypefn  {} {@var{y} =} gammainc (@var{x}, @var{a})
+## @deftypefnx {} {@var{y} =} gammainc (@var{x}, @var{a}, @var{tail})
 ## Compute the normalized incomplete gamma function.
 ##
 ## This is defined as
--- a/scripts/specfun/gammaincinv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/gammaincinv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} gammaincinv (@var{y}, @var{a})
-## @deftypefnx {} {} gammaincinv (@var{y}, @var{a}, @var{tail})
+## @deftypefn  {} {@var{x} =} gammaincinv (@var{y}, @var{a})
+## @deftypefnx {} {@var{x} =} gammaincinv (@var{y}, @var{a}, @var{tail})
 ## Compute the inverse of the normalized incomplete gamma function.
 ##
 ## The normalized incomplete gamma function is defined as
--- a/scripts/specfun/lcm.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/lcm.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} lcm (@var{x}, @var{y})
-## @deftypefnx {} {} lcm (@var{x}, @var{y}, @dots{})
+## @deftypefn  {} {@var{l} =} lcm (@var{x}, @var{y})
+## @deftypefnx {} {@var{l} =} lcm (@var{x}, @var{y}, @dots{})
 ## Compute the least common multiple of @var{x} and @var{y}, or of the list of
 ## all arguments.
 ##
--- a/scripts/specfun/nthroot.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/nthroot.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,7 +27,7 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn {} {} nthroot (@var{x}, @var{n})
+## @deftypefn {} {@var{y} =} nthroot (@var{x}, @var{n})
 ##
 ## Compute the real (non-complex) @var{n}-th root of @var{x}.
 ##
--- a/scripts/specfun/perms.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/perms.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} perms (@var{v})
+## @deftypefn {} {@var{P} =} perms (@var{v})
 ## Generate all permutations of vector @var{v} with one row per permutation.
 ##
 ## Results are returned in inverse lexicographic order.  The result has size
@@ -56,7 +56,7 @@
 ## type.  However, benchmarking shows doubles are faster.  If this changes in
 ## a later version of Octave the index variables here can be made uint8.
 
-function A = perms (v)
+function P = perms (v)
 
   if (nargin < 1)
     print_usage ();
@@ -73,13 +73,13 @@
   if (n < 4)    # special cases for small n
     switch (n)
       case 0
-        A = reshape (v, 1, 0);
+        P = reshape (v, 1, 0);
       case 1
-        A = v;
+        P = v;
       case 2
-        A = [v([2 1]);v];
+        P = [v([2 1]);v];
       case 3
-        A = v([3 2 1; 3 1 2; 2 3 1; 2 1 3; 1 3 2; 1 2 3]);
+        P = v([3 2 1; 3 1 2; 2 3 1; 2 1 3; 1 3 2; 1 2 3]);
     endswitch
   else
     v = v(end:-1:1);
@@ -101,12 +101,12 @@
 
     n += 1;
     f *= n-1;
-    A = v(1)(ones (factorial (n), n));
-    A(:,1) = v(ones (f, 1),:)(:);
+    P = v(1)(ones (factorial (n), n));
+    P(:,1) = v(ones (f, 1),:)(:);
 
     for i = 1:n
       b = v([1:i-1 i+1:n]);
-      A((1:f)+(i-1)*f, 2:end) = b(idx);
+      P((1:f)+(i-1)*f, 2:end) = b(idx);
     endfor
   endif
 
--- a/scripts/specfun/reallog.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/reallog.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} reallog (@var{x})
+## @deftypefn {} {@var{y} =} reallog (@var{x})
 ## Return the real-valued natural logarithm of each element of @var{x}.
 ##
 ## If any element results in a complex return value @code{reallog} aborts and
--- a/scripts/specfun/realpow.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/realpow.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} realpow (@var{x}, @var{y})
+## @deftypefn {} {@var{z} =} realpow (@var{x}, @var{y})
 ## Compute the real-valued, element-by-element power operator.
 ##
 ## This is equivalent to @w{@code{@var{x} .^ @var{y}}}, except that
--- a/scripts/specfun/realsqrt.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/realsqrt.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} realsqrt (@var{x})
+## @deftypefn {} {@var{y} =} realsqrt (@var{x})
 ## Return the real-valued square root of each element of @var{x}.
 ##
 ## If any element results in a complex return value @code{realsqrt} aborts and
--- a/scripts/specfun/sinint.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/specfun/sinint.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} sinint (@var{x})
+## @deftypefn {} {@var{y} =} sinint (@var{x})
 ## Compute the sine integral function:
 ## @tex
 ## $$
--- a/scripts/special-matrix/hadamard.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/hadamard.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,7 +27,7 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn {} {} hadamard (@var{n})
+## @deftypefn {} {@var{h} =} hadamard (@var{n})
 ## Construct a Hadamard matrix (@nospell{Hn}) of size @var{n}-by-@var{n}.
 ##
 ## The size @var{n} must be of the form @math{2^k * p} in which p is one of
--- a/scripts/special-matrix/hankel.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/hankel.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} hankel (@var{c})
-## @deftypefnx {} {} hankel (@var{c}, @var{r})
+## @deftypefn  {} {@var{h} =} hankel (@var{c})
+## @deftypefnx {} {@var{h} =} hankel (@var{c}, @var{r})
 ## Return the Hankel matrix constructed from the first column @var{c}, and
 ## (optionally) the last row @var{r}.
 ##
@@ -54,7 +54,7 @@
 ## @seealso{hadamard, toeplitz}
 ## @end deftypefn
 
-function retval = hankel (c, r)
+function h = hankel (c, r)
 
   if (nargin < 1)
     print_usage ();
@@ -85,7 +85,7 @@
   endif
 
   slices = cellslices (data, 1:nc, nr:1:nc+nr-1);
-  retval = horzcat (slices{:});
+  h = horzcat (slices{:});
 
 endfunction
 
--- a/scripts/special-matrix/hilb.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/hilb.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} hilb (@var{n})
+## @deftypefn {} {@var{h} =} hilb (@var{n})
 ## Return the Hilbert matrix of order @var{n}.
 ##
 ## The @math{i,j} element of a Hilbert matrix is defined as
@@ -58,9 +58,9 @@
 ## @seealso{invhilb}
 ## @end deftypefn
 
-function retval = hilb (n)
+function h = hilb (n)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   elseif (! isscalar (n))
     error ("hilb: N must be a scalar integer");
@@ -69,7 +69,7 @@
   ## Very elegant solution by N. Higham
   ## https://nhigham.com/2020/06/30/what-is-the-hilbert-matrix/
   j = 1:n;
-  retval = 1 ./ (j' + j - 1);
+  h = 1 ./ (j' + j - 1);
 
 endfunction
 
--- a/scripts/special-matrix/invhilb.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/invhilb.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} invhilb (@var{n})
+## @deftypefn {} {@var{hinv} =} invhilb (@var{n})
 ## Return the inverse of the Hilbert matrix of order @var{n}.
 ##
 ## This can be computed exactly using
@@ -79,7 +79,7 @@
 ## @seealso{hilb}
 ## @end deftypefn
 
-function retval = invhilb (n)
+function hinv = invhilb (n)
 
   if (nargin < 1)
     print_usage ();
@@ -101,17 +101,17 @@
   ## However, it rounds the answer to the nearest integer, which
   ## justifies the claim about exactness made above.
 
-  retval = zeros (n);
+  hinv = zeros (n);
   k = [1:n];
   p = k .* bincoeff (k+n-1, k-1) .* bincoeff (n, k);
   p(2:2:n) = -p(2:2:n);
   if (n < 203)
     for l = 1:n
-      retval(l,:) = (p(l) * p) ./ [l:l+n-1];
+      hinv(l,:) = (p(l) * p) ./ [l:l+n-1];
     endfor
   else
     for l = 1:n
-      retval(l,:) = p(l) * (p ./ [l:l+n-1]);
+      hinv(l,:) = p(l) * (p ./ [l:l+n-1]);
     endfor
   endif
 
--- a/scripts/special-matrix/magic.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/magic.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} magic (@var{n})
+## @deftypefn {} {@var{M} =} magic (@var{n})
 ##
 ## Create an @var{n}-by-@var{n} magic square.
 ##
@@ -36,7 +36,7 @@
 ## degenerate magic squares 1 and [].
 ## @end deftypefn
 
-function A = magic (n)
+function M = magic (n)
 
   if (nargin < 1)
     print_usage ();
@@ -46,40 +46,40 @@
   if (n < 0)
     error ("magic: N must be non-negative");
   elseif (n < 1)
-    A = [];
+    M = [];
   elseif (mod (n, 2) == 1)
 
     shift = floor ((0:n*n-1)/n);
     c = mod ([1:n*n] - shift + (n-3)/2, n);
     r = mod ([n*n:-1:1] + 2*shift, n);
-    A(c*n+r+1) = 1:n*n;
-    A = reshape (A, n, n);
+    M(c*n+r+1) = 1:n*n;
+    M = reshape (M, n, n);
 
   elseif (mod (n, 4) == 0)
 
-    A = reshape (1:n*n, n, n)';
+    M = reshape (1:n*n, n, n)';
     I = [1:4:n, 4:4:n];
     J = fliplr (I);
-    A(I,I) = A(J,J);
+    M(I,I) = M(J,J);
     I = [2:4:n, 3:4:n];
     J = fliplr (I);
-    A(I,I) = A(J,J);
+    M(I,I) = M(J,J);
 
   elseif (mod (n, 4) == 2)
 
     m = n/2;
-    A = magic (m);
-    A = [A, A+2*m*m; A+3*m*m, A+m*m];
+    M = magic (m);
+    M = [M, M+2*m*m; M+3*m*m, M+m*m];
     k = (m-1)/2;
     if (k > 1)
       I = 1:m;
       J = [2:k, n-k+2:n];
-      A([I,I+m],J) = A([I+m,I],J);
+      M([I,I+m],J) = M([I+m,I],J);
     endif
     I = [1:k, k+2:m];
-    A([I,I+m],1) = A([I+m,I],1);
+    M([I,I+m],1) = M([I+m,I],1);
     I = k + 1;
-    A([I,I+m],I) = A([I+m,I],I);
+    M([I,I+m],I) = M([I+m,I],I);
 
   endif
 
--- a/scripts/special-matrix/pascal.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/pascal.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} pascal (@var{n})
-## @deftypefnx {} {} pascal (@var{n}, @var{t})
+## @deftypefn  {} {@var{P} =} pascal (@var{n})
+## @deftypefnx {} {@var{P} =} pascal (@var{n}, @var{t})
 ## Return the Pascal matrix of order @var{n} if @code{@var{t} = 0}.
 ##
 ## The default value of @var{t} is 0.
@@ -45,7 +45,7 @@
 ## @seealso{chol}
 ## @end deftypefn
 
-function retval = pascal (n, t = 0)
+function P = pascal (n, t = 0)
 
   if (nargin < 1)
     print_usage ();
@@ -55,27 +55,27 @@
     error ("pascal: T must be -1, 0, 1, or 2, found %d", t);
   endif
 
-  retval = zeros (n);
+  P = zeros (n);
   if (n > 0)
-    retval(:,1) = 1;
+    P(:,1) = 1;
   endif
 
   if (t == -1)
     for j = 2:n
-      retval(j:n,j) = cumsum (retval(j-1:n-1,j-1));
+      P(j:n,j) = cumsum (P(j-1:n-1,j-1));
     endfor
   else
     for j = 2:n
-      retval(j:n,j) = -cumsum (retval(j-1:n-1,j-1));
+      P(j:n,j) = -cumsum (P(j-1:n-1,j-1));
     endfor
   endif
 
   if (t == 0)
-    retval = retval*retval';
+    P = P*P';
   elseif (t == 2)
-    retval = rot90 (retval, 3);
+    P = rot90 (P, 3);
     if (rem (n,2) != 1)
-      retval *= -1;
+      P *= -1;
     endif
   endif
 
--- a/scripts/special-matrix/rosser.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/rosser.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,23 +24,23 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} rosser ()
+## @deftypefn {} {@var{R} =} rosser ()
 ## Return the @nospell{Rosser} matrix.
 ##
 ## This is a difficult test case used to evaluate eigenvalue algorithms.
 ## @seealso{wilkinson, eig}
 ## @end deftypefn
 
-function retval = rosser ()
+function R = rosser ()
 
-  retval = [611,   196,  -192,   407,    -8,   -52,   -49,    29;
-            196,   899,   113,  -192,   -71,   -43,    -8,   -44;
-           -192,   113,   899,   196,    61,    49,     8,    52;
-            407,  -192,   196,   611,     8,    44,    59,   -23;
-             -8,   -71,    61,     8,   411,  -599,   208,   208;
-            -52,   -43,    49,    44,  -599,   411,   208,   208;
-            -49,    -8,     8,    59,   208,   208,    99,  -911;
-             29,   -44,    52,   -23,   208,   208,  -911,    99];
+  R = [611,   196,  -192,   407,    -8,   -52,   -49,    29;
+       196,   899,   113,  -192,   -71,   -43,    -8,   -44;
+      -192,   113,   899,   196,    61,    49,     8,    52;
+       407,  -192,   196,   611,     8,    44,    59,   -23;
+        -8,   -71,    61,     8,   411,  -599,   208,   208;
+       -52,   -43,    49,    44,  -599,   411,   208,   208;
+       -49,    -8,     8,    59,   208,   208,    99,  -911;
+        29,   -44,    52,   -23,   208,   208,  -911,    99];
 
 endfunction
 
--- a/scripts/special-matrix/toeplitz.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/toeplitz.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} toeplitz (@var{c})
-## @deftypefnx {} {} toeplitz (@var{c}, @var{r})
+## @deftypefn  {} {@var{T} =} toeplitz (@var{c})
+## @deftypefnx {} {@var{T} =} toeplitz (@var{c}, @var{r})
 ## Return the Toeplitz matrix constructed from the first column @var{c},
 ## and optionally the first row @var{r}.
 ##
@@ -63,7 +63,7 @@
 ## @seealso{hankel}
 ## @end deftypefn
 
-function retval = toeplitz (c, r)
+function T = toeplitz (c, r)
 
   if (nargin < 1)
     print_usage ();
@@ -90,7 +90,7 @@
 
   if (nr == 0 || nc == 0)
     ## Empty matrix.
-    retval = zeros (nr, nc, class (c));
+    T = zeros (nr, nc, class (c));
     return;
   endif
 
@@ -112,8 +112,8 @@
     ridx = ridx(ridx > 1);
 
     ## Form matrix.
-    retval = spdiags (repmat (c(cidx),nr,1),1-cidx,nr,nc) + ...
-             spdiags (repmat (r(ridx),nr,1),ridx-1,nr,nc);
+    T = spdiags (repmat (c(cidx),nr,1),1-cidx,nr,nc) + ...
+                 spdiags (repmat (r(ridx),nr,1),ridx-1,nr,nc);
   else
     ## Concatenate data into a single column vector.
     data = [r(end:-1:2)(:); c(:)];
@@ -122,7 +122,7 @@
     slices = cellslices (data, nc:-1:1, nc+nr-1:-1:nr);
 
     ## Form matrix.
-    retval = horzcat (slices{:});
+    T = horzcat (slices{:});
   endif
 
 endfunction
--- a/scripts/special-matrix/vander.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/vander.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} vander (@var{c})
-## @deftypefnx {} {} vander (@var{c}, @var{n})
+## @deftypefn  {} {@var{V} =} vander (@var{c})
+## @deftypefnx {} {@var{V} =} vander (@var{c}, @var{n})
 ## Return the @nospell{Vandermonde} matrix whose next to last column is
 ## @var{c}.
 ##
@@ -58,11 +58,9 @@
 ## @seealso{polyfit}
 ## @end deftypefn
 
-function retval = vander (c, n)
+function V = vander (c, n)
 
-  if (nargin == 1)
-    n = length (c);
-  elseif (nargin != 2)
+  if (nargin < 1)
     print_usage ();
   endif
 
@@ -70,12 +68,18 @@
     error ("vander: polynomial C must be a vector");
   endif
 
+  if (nargin == 1)
+    n = length (c);
+  elseif (! isscalar (n))
+    error ("vander: N must be a positive scalar integer");
+  endif
+
   ## avoiding many ^s appears to be faster for n >= 100.
-  retval = zeros (length (c), n, class (c));
+  V = zeros (numel (c), n, class (c));
+  c = c(:);
   d = 1;
-  c = c(:);
   for i = n:-1:1
-    retval(:,i) = d;
+    V(:,i) = d;
     d .*= c;
   endfor
 
@@ -95,5 +99,7 @@
 %!assert (vander (2, 3), [4, 2, 1])
 %!assert (vander ([2, 3], 3), [4, 2, 1; 9, 3, 1])
 
+## Test input validation
 %!error <Invalid call> vander ()
 %!error <polynomial C must be a vector> vander ([1, 2; 3, 4])
+%!error <N must be a positive scalar integer> vander (1, [1, 2])
--- a/scripts/special-matrix/wilkinson.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/special-matrix/wilkinson.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} wilkinson (@var{n})
+## @deftypefn {} {@var{W} =} wilkinson (@var{n})
 ## Return the Wilkinson matrix of order @var{n}.
 ##
 ## Wilkinson matrices are symmetric and tridiagonal with pairs of nearly, but
@@ -34,7 +34,7 @@
 ## @seealso{rosser, eig}
 ## @end deftypefn
 
-function retval = wilkinson (n)
+function W = wilkinson (n)
 
   if (nargin < 1)
     print_usage ();
@@ -46,7 +46,7 @@
 
   side = ones (n-1, 1);
   center = abs (-(n-1)/2:(n-1)/2);
-  retval = diag (side, -1) + diag (center) + diag (side, 1);
+  W = diag (side, -1) + diag (center) + diag (side, 1);
 
 endfunction
 
--- a/scripts/statistics/center.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/center.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} center (@var{x})
-## @deftypefnx {} {} center (@var{x}, @var{dim})
+## @deftypefn  {} {@var{y} =} center (@var{x})
+## @deftypefnx {} {@var{y} =} center (@var{x}, @var{dim})
 ## Center data by subtracting its mean.
 ##
 ## If @var{x} is a vector, subtract its mean.
@@ -42,7 +42,7 @@
 ## @seealso{zscore}
 ## @end deftypefn
 
-function retval = center (x, dim)
+function y = center (x, dim)
 
   if (nargin < 1)
     print_usage ();
@@ -70,12 +70,12 @@
   n = size (x, dim);
 
   if (n == 0)
-    retval = x;
+    y = x;
   else
     ## FIXME: Use bsxfun, rather than broadcasting, until broadcasting
     ##        supports diagonal and sparse matrices (Bugs #41441, #35787).
-    retval = bsxfun (@minus, x, mean (x, dim));
-    ## retval = x - mean (x, dim);   # automatic broadcasting
+    y = bsxfun (@minus, x, mean (x, dim));
+    ## y = x - mean (x, dim);   # automatic broadcasting
   endif
 
 endfunction
--- a/scripts/statistics/corr.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/corr.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} corr (@var{x})
-## @deftypefnx {} {} corr (@var{x}, @var{y})
+## @deftypefn  {} {@var{r} =} corr (@var{x})
+## @deftypefnx {} {@var{r} =} corr (@var{x}, @var{y})
 ## Compute matrix of correlation coefficients.
 ##
 ## If each row of @var{x} and @var{y} is an observation and each column is
@@ -49,7 +49,7 @@
 ## @seealso{cov}
 ## @end deftypefn
 
-function retval = corr (x, y = [])
+function r = corr (x, y = [])
 
   if (nargin < 1)
     print_usage ();
@@ -60,9 +60,9 @@
   ## Special case, scalar is always 100% correlated with itself
   if (isscalar (x))
     if (isa (x, "single"))
-      retval = single (1);
+      r = single (1);
     else
-      retval = 1;
+      r = 1;
     endif
     return;
   endif
@@ -72,11 +72,11 @@
   if (nargin == 2)
     c = cov (x, y);
     s = std (x)' * std (y);
-    retval = c ./ s;
+    r = c ./ s;
   else
     c = cov (x);
     s = sqrt (diag (c));
-    retval = c ./ (s * s');
+    r = c ./ (s * s');
   endif
 
 endfunction
--- a/scripts/statistics/cov.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/cov.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} cov (@var{x})
-## @deftypefnx {} {} cov (@var{x}, @var{opt})
-## @deftypefnx {} {} cov (@var{x}, @var{y})
-## @deftypefnx {} {} cov (@var{x}, @var{y}, @var{opt})
+## @deftypefn  {} {@var{c} =} cov (@var{x})
+## @deftypefnx {} {@var{c} =} cov (@var{x}, @var{opt})
+## @deftypefnx {} {@var{c} =} cov (@var{x}, @var{y})
+## @deftypefnx {} {@var{c} =} cov (@var{x}, @var{y}, @var{opt})
 ## Compute the covariance matrix.
 ##
 ## If each row of @var{x} and @var{y} is an observation, and each column is
--- a/scripts/statistics/discrete_cdf.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/discrete_cdf.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} discrete_cdf (@var{x}, @var{v}, @var{p})
+## @deftypefn {} {@var{cdf} =} discrete_cdf (@var{x}, @var{v}, @var{p})
 ## For each element of @var{x}, compute the cumulative distribution function
 ## (CDF) at @var{x} of a univariate discrete distribution which assumes the
 ## values in @var{v} with probabilities @var{p}.
--- a/scripts/statistics/discrete_inv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/discrete_inv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,13 +24,13 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} discrete_inv (@var{x}, @var{v}, @var{p})
+## @deftypefn {} {@var{q} =} discrete_inv (@var{x}, @var{v}, @var{p})
 ## For each element of @var{x}, compute the quantile (the inverse of the CDF)
 ## at @var{x} of the univariate distribution which assumes the values in
 ## @var{v} with probabilities @var{p}.
 ## @end deftypefn
 
-function inv = discrete_inv (x, v, p)
+function q = discrete_inv (x, v, p)
 
   if (nargin != 3)
     print_usage ();
@@ -47,9 +47,9 @@
   endif
 
   if (isa (x, "single") || isa (v, "single") || isa (p, "single"))
-    inv = NaN (size (x), "single");
+    q = NaN (size (x), "single");
   else
-    inv = NaN (size (x));
+    q = NaN (size (x));
   endif
 
   ## FIXME: This isn't elegant.  But cumsum and lookup together produce
@@ -62,13 +62,13 @@
   p = cumsum (p(idx)(:)) / sum (p);  # Reshape and normalize probability vector
 
   k = (x == 0);
-  inv(k) = v(1);
+  q(k) = v(1);
 
   k = (x == 1);
-  inv(k) = v(end);
+  q(k) = v(end);
 
   k = (x > 0) & (x < 1);
-  inv(k) = v(length (p) - lookup (sort (p, "descend"), x(k)) + 1);
+  q(k) = v(length (p) - lookup (sort (p, "descend"), x(k)) + 1);
 
 endfunction
 
--- a/scripts/statistics/discrete_pdf.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/discrete_pdf.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} discrete_pdf (@var{x}, @var{v}, @var{p})
+## @deftypefn {} {@var{pdf} =} discrete_pdf (@var{x}, @var{v}, @var{p})
 ## For each element of @var{x}, compute the probability density function (PDF)
 ## at @var{x} of a univariate discrete distribution which assumes the values
 ## in @var{v} with probabilities @var{p}.
--- a/scripts/statistics/discrete_rnd.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/discrete_rnd.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} discrete_rnd (@var{v}, @var{p})
-## @deftypefnx {} {} discrete_rnd (@var{v}, @var{p}, @var{r})
-## @deftypefnx {} {} discrete_rnd (@var{v}, @var{p}, @var{r}, @var{c}, @dots{})
-## @deftypefnx {} {} discrete_rnd (@var{v}, @var{p}, [@var{sz}])
+## @deftypefn  {} {@var{rnd} =} discrete_rnd (@var{v}, @var{p})
+## @deftypefnx {} {@var{rnd} =} discrete_rnd (@var{v}, @var{p}, @var{r})
+## @deftypefnx {} {@var{rnd} =} discrete_rnd (@var{v}, @var{p}, @var{r}, @var{c}, @dots{})
+## @deftypefnx {} {@var{rnd} =} discrete_rnd (@var{v}, @var{p}, [@var{sz}])
 ## Return a matrix of random samples from the univariate distribution which
 ## assumes the values in @var{v} with probabilities @var{p}.
 ##
--- a/scripts/statistics/empirical_cdf.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/empirical_cdf.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} empirical_cdf (@var{x}, @var{data})
+## @deftypefn {} {@var{cdf} =} empirical_cdf (@var{x}, @var{data})
 ## For each element of @var{x}, compute the cumulative distribution function
 ## (CDF) at @var{x} of the empirical distribution obtained from
 ## the univariate sample @var{data}.
--- a/scripts/statistics/empirical_inv.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/empirical_inv.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,13 +24,13 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} empirical_inv (@var{x}, @var{data})
+## @deftypefn {} {@var{q} =} empirical_inv (@var{x}, @var{data})
 ## For each element of @var{x}, compute the quantile (the inverse of the CDF)
 ## at @var{x} of the empirical distribution obtained from the
 ## univariate sample @var{data}.
 ## @end deftypefn
 
-function inv = empirical_inv (x, data)
+function q = empirical_inv (x, data)
 
   if (nargin != 2)
     print_usage ();
@@ -40,7 +40,7 @@
     error ("empirical_inv: DATA must be a vector");
   endif
 
-  inv = discrete_inv (x, data, ones (size (data)));
+  q = discrete_inv (x, data, ones (size (data)));
 
 endfunction
 
--- a/scripts/statistics/empirical_pdf.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/empirical_pdf.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} empirical_pdf (@var{x}, @var{data})
+## @deftypefn {} {@var{pdf} =} empirical_pdf (@var{x}, @var{data})
 ## For each element of @var{x}, compute the probability density function (PDF)
 ## at @var{x} of the empirical distribution obtained from the
 ## univariate sample @var{data}.
--- a/scripts/statistics/empirical_rnd.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/empirical_rnd.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} empirical_rnd (@var{data})
-## @deftypefnx {} {} empirical_rnd (@var{data}, @var{r})
-## @deftypefnx {} {} empirical_rnd (@var{data}, @var{r}, @var{c}, @dots{})
-## @deftypefnx {} {} empirical_rnd (@var{data}, [@var{sz}])
+## @deftypefn  {} {@var{rnd} =} empirical_rnd (@var{data})
+## @deftypefnx {} {@var{rnd} =} empirical_rnd (@var{data}, @var{r})
+## @deftypefnx {} {@var{rnd} =} empirical_rnd (@var{data}, @var{r}, @var{c}, @dots{})
+## @deftypefnx {} {@var{rnd} =} empirical_rnd (@var{data}, [@var{sz}])
 ## Return a matrix of random samples from the empirical distribution obtained
 ## from the univariate sample @var{data}.
 ##
--- a/scripts/statistics/kendall.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/kendall.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} kendall (@var{x})
-## @deftypefnx {} {} kendall (@var{x}, @var{y})
+## @deftypefn  {} {@var{tau} =} kendall (@var{x})
+## @deftypefnx {} {@var{tau} =} kendall (@var{x}, @var{y})
 ## @cindex Kendall's Tau
 ## Compute Kendall's
 ## @tex
--- a/scripts/statistics/kurtosis.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/kurtosis.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} kurtosis (@var{x})
-## @deftypefnx {} {} kurtosis (@var{x}, @var{flag})
-## @deftypefnx {} {} kurtosis (@var{x}, @var{flag}, @var{dim})
+## @deftypefn  {} {@var{y} =} kurtosis (@var{x})
+## @deftypefnx {} {@var{y} =} kurtosis (@var{x}, @var{flag})
+## @deftypefnx {} {@var{y} =} kurtosis (@var{x}, @var{flag}, @var{dim})
 ## Compute the sample kurtosis of the elements of @var{x}.
 ##
 ## The sample kurtosis is defined as
--- a/scripts/statistics/mad.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/mad.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} mad (@var{x})
-## @deftypefnx {} {} mad (@var{x}, @var{opt})
-## @deftypefnx {} {} mad (@var{x}, @var{opt}, @var{dim})
+## @deftypefn  {} {@var{y} =} mad (@var{x})
+## @deftypefnx {} {@var{y} =} mad (@var{x}, @var{opt})
+## @deftypefnx {} {@var{y} =} mad (@var{x}, @var{opt}, @var{dim})
 ## Compute the mean or median absolute deviation of the elements of @var{x}.
 ##
 ## The mean absolute deviation is defined as
--- a/scripts/statistics/mean.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/mean.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} mean (@var{x})
-## @deftypefnx {} {} mean (@var{x}, @var{dim})
-## @deftypefnx {} {} mean (@var{x}, @var{opt})
-## @deftypefnx {} {} mean (@var{x}, @var{dim}, @var{opt})
-## @deftypefnx {} {} mean (@dots{}, @var{outtype})
+## @deftypefn  {} {@var{y} =} mean (@var{x})
+## @deftypefnx {} {@var{y} =} mean (@var{x}, @var{dim})
+## @deftypefnx {} {@var{y} =} mean (@var{x}, @var{opt})
+## @deftypefnx {} {@var{y} =} mean (@var{x}, @var{dim}, @var{opt})
+## @deftypefnx {} {@var{y} =} mean (@dots{}, @var{outtype})
 ## Compute the mean of the elements of the vector @var{x}.
 ##
 ## The mean is defined as
--- a/scripts/statistics/meansq.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/meansq.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} meansq (@var{x})
-## @deftypefnx {} {} meansq (@var{x}, @var{dim})
+## @deftypefn  {} {@var{y} =} meansq (@var{x})
+## @deftypefnx {} {@var{y} =} meansq (@var{x}, @var{dim})
 ## Compute the mean square of the elements of the vector @var{x}.
 ##
 ## The mean square is defined as
--- a/scripts/statistics/median.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/median.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} median (@var{x})
-## @deftypefnx {} {} median (@var{x}, @var{dim})
+## @deftypefn  {} {@var{y} =} median (@var{x})
+## @deftypefnx {} {@var{y} =} median (@var{x}, @var{dim})
 ## Compute the median value of the elements of the vector @var{x}.
 ##
 ## When the elements of @var{x} are sorted, say
@@ -60,7 +60,7 @@
 ## @seealso{mean, mode}
 ## @end deftypefn
 
-function retval = median (x, dim)
+function y = median (x, dim)
 
   if (nargin < 1)
     print_usage ();
@@ -88,16 +88,16 @@
   n = size (x, dim);
   k = floor ((n+1) / 2);
   if (mod (n, 2) == 1)
-    retval = nth_element (x, k, dim);
+    y = nth_element (x, k, dim);
   else
-    retval = sum (nth_element (x, k:k+1, dim), dim, "native") / 2;
+    y = sum (nth_element (x, k:k+1, dim), dim, "native") / 2;
     if (islogical (x))
-      retval = logical (retval);
+      y = logical (y);
     endif
   endif
   ## Inject NaNs where needed, to be consistent with Matlab.
   if (isfloat (x))
-    retval(any (isnan (x), dim)) = NaN;
+    y(any (isnan (x), dim)) = NaN;
   endif
 
 endfunction
--- a/scripts/statistics/mode.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/mode.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} mode (@var{x})
-## @deftypefnx {} {} mode (@var{x}, @var{dim})
+## @deftypefn  {} {@var{m} =} mode (@var{x})
+## @deftypefnx {} {@var{m} =} mode (@var{x}, @var{dim})
 ## @deftypefnx {} {[@var{m}, @var{f}, @var{c}] =} mode (@dots{})
 ## Compute the most frequently occurring value in a dataset (mode).
 ##
--- a/scripts/statistics/moment.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/moment.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} moment (@var{x}, @var{p})
-## @deftypefnx {} {} moment (@var{x}, @var{p}, @var{type})
-## @deftypefnx {} {} moment (@var{x}, @var{p}, @var{dim})
-## @deftypefnx {} {} moment (@var{x}, @var{p}, @var{type}, @var{dim})
-## @deftypefnx {} {} moment (@var{x}, @var{p}, @var{dim}, @var{type})
+## @deftypefn  {} {@var{m} =} moment (@var{x}, @var{p})
+## @deftypefnx {} {@var{m} =} moment (@var{x}, @var{p}, @var{type})
+## @deftypefnx {} {@var{m} =} moment (@var{x}, @var{p}, @var{dim})
+## @deftypefnx {} {@var{m} =} moment (@var{x}, @var{p}, @var{type}, @var{dim})
+## @deftypefnx {} {@var{m} =} moment (@var{x}, @var{p}, @var{dim}, @var{type})
 ## Compute the @var{p}-th central moment of the vector @var{x}.
 ##
 ## The @var{p}-th central moment of @var{x} is defined as:
--- a/scripts/statistics/range.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/range.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} range (@var{x})
-## @deftypefnx {} {} range (@var{x}, @var{dim})
+## @deftypefn  {} {@var{y} =} range (@var{x})
+## @deftypefnx {} {@var{y} =} range (@var{x}, @var{dim})
 ## Return the range, i.e., the difference between the maximum and the minimum
 ## of the input data.
 ##
--- a/scripts/statistics/ranks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/ranks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} ranks (@var{x})
-## @deftypefnx {} {} ranks (@var{x}, @var{dim})
-## @deftypefnx {} {} ranks (@var{x}, @var{dim}, @var{rtype})
+## @deftypefn  {} {@var{y} =} ranks (@var{x})
+## @deftypefnx {} {@var{y} =} ranks (@var{x}, @var{dim})
+## @deftypefnx {} {@var{y} =} ranks (@var{x}, @var{dim}, @var{rtype})
 ## Return the ranks (in the sense of order statistics) of @var{x} along the
 ## first non-singleton dimension adjusted for ties.
 ##
--- a/scripts/statistics/run_count.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/run_count.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} run_count (@var{x}, @var{n})
-## @deftypefnx {} {} run_count (@var{x}, @var{n}, @var{dim})
+## @deftypefn  {} {@var{cnt} =} run_count (@var{x}, @var{n})
+## @deftypefnx {} {@var{cnt} =} run_count (@var{x}, @var{n}, @var{dim})
 ## Count the upward runs along the first non-singleton dimension of @var{x}
 ## of length 1, 2, @dots{}, @var{n}-1 and greater than or equal to @var{n}.
 ##
@@ -34,7 +34,7 @@
 ## @seealso{runlength}
 ## @end deftypefn
 
-function retval = run_count (x, n, dim)
+function cnt = run_count (x, n, dim)
 
   if (nargin < 2)
     print_usage ();
@@ -44,7 +44,7 @@
     error ("run_count: X must be a numeric vector or matrix");
   endif
 
-  if (!(isscalar (n) && n == fix (n) && n > 0))
+  if (! (isscalar (n) && n == fix (n) && n > 0))
     error ("run_count: N must be a positive integer");
   endif
 
@@ -82,16 +82,16 @@
   tmp = tmp(idx{:});
 
   sz(1) = n;
-  retval = zeros (sz);
+  cnt = zeros (sz);
   for k = 1 : (n-1)
     idx{1} = k;
-    retval(idx{:}) = sum (tmp == k);
+    cnt(idx{:}) = sum (tmp == k);
   endfor
   idx{1} = n;
-  retval(idx{:}) = sum (tmp >= n);
+  cnt(idx{:}) = sum (tmp >= n);
 
   if (dim != 1)
-    retval = ipermute (retval, perm);
+    cnt = ipermute (cnt, perm);
   endif
 
 endfunction
--- a/scripts/statistics/skewness.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/skewness.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} skewness (@var{x})
-## @deftypefnx {} {} skewness (@var{x}, @var{flag})
-## @deftypefnx {} {} skewness (@var{x}, @var{flag}, @var{dim})
+## @deftypefn  {} {@var{y} =} skewness (@var{x})
+## @deftypefnx {} {@var{y} =} skewness (@var{x}, @var{flag})
+## @deftypefnx {} {@var{y} =} skewness (@var{x}, @var{flag}, @var{dim})
 ## Compute the sample skewness of the elements of @var{x}.
 ##
 ## The sample skewness is defined as
--- a/scripts/statistics/spearman.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/spearman.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} spearman (@var{x})
-## @deftypefnx {} {} spearman (@var{x}, @var{y})
+## @deftypefn  {} {@var{rho} =} spearman (@var{x})
+## @deftypefnx {} {@var{rho} =} spearman (@var{x}, @var{y})
 ## @cindex Spearman's Rho
 ## Compute Spearman's rank correlation coefficient
 ## @tex
--- a/scripts/statistics/statistics.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/statistics.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} statistics (@var{x})
-## @deftypefnx {} {} statistics (@var{x}, @var{dim})
+## @deftypefn  {} {@var{stats} =} statistics (@var{x})
+## @deftypefnx {} {@var{stats} =} statistics (@var{x}, @var{dim})
 ## Return a vector with the minimum, first quartile, median, third quartile,
 ## maximum, mean, standard deviation, skewness, and kurtosis of the elements of
 ## the vector @var{x}.
--- a/scripts/statistics/std.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/statistics/std.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,10 +24,10 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} std (@var{x})
-## @deftypefnx {} {} std (@var{x}, @var{w})
-## @deftypefnx {} {} std (@var{x}, @var{w}, @var{dim})
-## @deftypefnx {} {} std (@var{x}, @var{w}, @qcode{"ALL"})
+## @deftypefn  {} {@var{y} =} std (@var{x})
+## @deftypefnx {} {@var{y} =} std (@var{x}, @var{w})
+## @deftypefnx {} {@var{y} =} std (@var{x}, @var{w}, @var{dim})
+## @deftypefnx {} {@var{y} =} std (@var{x}, @var{w}, @qcode{"ALL"})
 ## Compute the standard deviation of the elements of the vector @var{x}.
 ##
 ## The standard deviation is defined as
@@ -87,9 +87,9 @@
 ## @seealso{var, bounds, mad, range, iqr, mean, median}
 ## @end deftypefn
 
-function retval = std (varargin)
+function y = std (varargin)
 
-  retval = sqrt (var (varargin{:}));
+  y = sqrt (var (varargin{:}));
 
 endfunction
 
--- a/scripts/strings/base2dec.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/base2dec.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} base2dec (@var{s}, @var{base})
-## Convert @var{s} from a string of digits in base @var{base} to a decimal
+## @deftypefn {} {@var{d} =} base2dec (@var{str}, @var{base})
+## Convert @var{str} from a string of digits in base @var{base} to a decimal
 ## integer (base 10).
 ##
 ## @example
@@ -35,15 +35,16 @@
 ## @end group
 ## @end example
 ##
-## If @var{s} is a string matrix, return a column vector with one value per
-## row of @var{s}.  If a row contains invalid symbols then the corresponding
+## If @var{str} is a string matrix, return a column vector with one value per
+## row of @var{str}.  If a row contains invalid symbols then the corresponding
 ## value will be NaN@.
 ##
-## If @var{s} is a cell array of strings, return a column vector with one
-## value per cell element in @var{s}.
+## If @var{str} is a cell array of strings, return a column vector with one
+## value per cell element in @var{str}.
 ##
 ## If @var{base} is a string, the characters of @var{base} are used as the
-## symbols for the digits of @var{s}.  Space (' ') may not be used as a symbol.
+## symbols for the digits of @var{str}.  Space (' ') may not be used as a
+## symbol.
 ##
 ## @example
 ## @group
@@ -54,16 +55,16 @@
 ## @seealso{dec2base, bin2dec, hex2dec}
 ## @end deftypefn
 
-function out = base2dec (s, base)
+function d = base2dec (str, base)
 
   if (nargin != 2)
     print_usage ();
   endif
 
-  if (iscellstr (s))
-    s = char (s);
-  elseif (! ischar (s))
-    error ("base2dec: S must be a string or cellstring");
+  if (iscellstr (str))
+    str = char (str);
+  elseif (! ischar (str))
+    error ("base2dec: STR must be a string or cellstring");
   endif
 
   symbols = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -81,16 +82,16 @@
   elseif (! (base >= 2 && base <= length (symbols)))
     error ("base2dec: BASE must be between 2 and 36, or a string of symbols");
   else
-    s = toupper (s);
+    str = toupper (str);
   endif
 
   ## Right justify the values and squeeze out any spaces.
   ## This looks complicated, but indexing solution is very fast
   ## compared to alternatives which use cellstr or cellfun or looping.
-  [nr, nc] = size (s);
+  [nr, nc] = size (str);
   if (nc > 1)   # Bug #35621
-    s = s.';
-    nonbl = s != " ";
+    str = str.';
+    nonbl = str != " ";
     num_nonbl = sum (nonbl);
     nc = max (num_nonbl);
     num_blank = nc - num_nonbl;
@@ -102,8 +103,8 @@
 
     ## Create a blank matrix and position the nonblank characters.
     s2 = repmat (" ", nc, nr);
-    s2(idx) = s(nonbl);
-    s = s2.';
+    s2(idx) = str(nonbl);
+    str = s2.';
   endif
 
   ## Lookup value of symbols in symbol table, with invalid symbols
@@ -111,11 +112,11 @@
   table = NaN (1, 256);
   table(double (symbols(1:base))) = 0 : base-1;
   table(double (" ")) = 0;
-  s = reshape (table(double (s)), size (s));
+  str = reshape (table(double (str)), size (str));
 
   ## Multiply the resulting digits by the appropriate power
   ## and sum the rows.
-  out = s * (base .^ (columns (s)-1 : -1 : 0)');
+  d = str * (base .^ (columns (str)-1 : -1 : 0)');
 
 endfunction
 
--- a/scripts/strings/bin2dec.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/bin2dec.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} bin2dec (@var{s})
+## @deftypefn {} {} bin2dec (@var{str})
 ## Return the decimal number corresponding to the binary number represented
-## by the string @var{s}.
+## by the string @var{str}.
 ##
 ## For example:
 ##
@@ -47,21 +47,21 @@
 ## @end group
 ## @end example
 ##
-## If @var{s} is a string matrix, return a column vector with one converted
-## number per row of @var{s}; Invalid rows evaluate to NaN@.
+## If @var{str} is a string matrix, return a column vector with one converted
+## number per row of @var{str}; Invalid rows evaluate to NaN@.
 ##
-## If @var{s} is a cell array of strings, return a column vector with one
-## converted number per cell element in @var{s}.
+## If @var{str} is a cell array of strings, return a column vector with one
+## converted number per cell element in @var{str}.
 ## @seealso{dec2bin, base2dec, hex2dec}
 ## @end deftypefn
 
-function d = bin2dec (s)
+function d = bin2dec (str)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
-  d = base2dec (s, 2);
+  d = base2dec (str, 2);
 
 endfunction
 
@@ -76,4 +76,4 @@
 
 ## Test input validation
 %!error <Invalid call> bin2dec ()
-%!error <S must be a string> bin2dec (1)
+%!error <STR must be a string> bin2dec (1)
--- a/scripts/strings/blanks.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/blanks.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} blanks (@var{n})
+## @deftypefn {} {@var{str} =} blanks (@var{n})
 ## Return a string of @var{n} blanks.
 ##
 ## For example:
@@ -42,7 +42,7 @@
 ## @seealso{repmat}
 ## @end deftypefn
 
-function s = blanks (n)
+function str = blanks (n)
 
   if (nargin < 1)
     print_usage ();
@@ -52,7 +52,7 @@
 
   ## If 1:n is empty, the following expression will create an empty
   ## character string.  Otherwise, it will create a row vector.
-  s(1:n) = " ";
+  str(1:n) = " ";
 
 endfunction
 
--- a/scripts/strings/cstrcat.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/cstrcat.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} cstrcat (@var{s1}, @var{s2}, @dots{})
+## @deftypefn {} {@var{str} =} cstrcat (@var{s1}, @var{s2}, @dots{})
 ## Return a string containing all the arguments concatenated horizontally
 ## with trailing white space preserved.
 ##
@@ -48,14 +48,14 @@
 ## @seealso{strcat, char, strvcat}
 ## @end deftypefn
 
-function st = cstrcat (varargin)
+function str = cstrcat (varargin)
 
   if (nargin == 0)
-    ## Special because if varargin is empty, iscellstr still returns
+    ## Special case because if varargin is empty, iscellstr still returns
     ## true but then "[varargin{:}]" would be of class double.
-    st = "";
+    str = "";
   elseif (iscellstr (varargin))
-    st = [varargin{:}];
+    str = [varargin{:}];
   else
     error ("cstrcat: arguments must be character strings");
   endif
@@ -64,15 +64,16 @@
 
 
 ## Test the dimensionality
-## 1d
+## 1-D
 %!assert (cstrcat ("ab ", "ab "), "ab ab ")
-## 2d
+## 2-D
 %!assert (cstrcat (["ab ";"cde"], ["ab ";"cde"]), ["ab ab ";"cdecde"])
 
 %!assert (cstrcat ("foo", "bar"), "foobar")
 %!assert (cstrcat (["a "; "bb"], ["foo"; "bar"]), ["a foo"; "bbbar"])
 
+## Special null case
 %!assert (cstrcat (), "")
 
 ## Test input validation
-%!error cstrcat (1, 2)
+%!error <arguments must be character strings> cstrcat (1, 2)
--- a/scripts/strings/deblank.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/deblank.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} deblank (@var{s})
+## @deftypefn {} {@var{s} =} deblank (@var{s})
 ## Remove trailing whitespace and nulls from @var{s}.
 ##
 ## If @var{s} is a matrix, @var{deblank} trims each row to the length of
-## longest string.  If @var{s} is a cell array of strings, operate
+## the longest string.  If @var{s} is a cell array of strings, operate
 ## recursively on each string element.
 ##
 ## Examples:
@@ -47,7 +47,7 @@
 
 function s = deblank (s)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
--- a/scripts/strings/dec2base.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/dec2base.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} dec2base (@var{d}, @var{base})
-## @deftypefnx {} {} dec2base (@var{d}, @var{base}, @var{len})
+## @deftypefn  {} {@var{str} =} dec2base (@var{d}, @var{base})
+## @deftypefnx {} {@var{str} =} dec2base (@var{d}, @var{base}, @var{len})
 ## Return a string of symbols in base @var{base} corresponding to the
 ## non-negative integer @var{d}.
 ##
@@ -56,7 +56,7 @@
 ## @seealso{base2dec, dec2bin, dec2hex}
 ## @end deftypefn
 
-function retval = dec2base (d, base, len)
+function str = dec2base (d, base, len)
 
   if (nargin < 2)
     print_usage ();
@@ -109,7 +109,7 @@
   endfor
 
   ## convert digits to symbols
-  retval = reshape (symbols(digits+1), size (digits));
+  str = reshape (symbols(digits+1), size (digits));
 
   ## Check if the first element is the zero symbol.  It seems possible
   ## that LEN is provided, and is less than the computed MAX_LEN and
@@ -117,8 +117,8 @@
   ## have a leading zero to remove.  But if LEN >= MAX_LEN, we should
   ## not remove any leading zeros.
   if ((nargin == 2 || (nargin == 3 && max_len > len))
-      && columns (retval) != 1 && ! any (retval(:,1) != symbols(1)))
-    retval = retval(:,2:end);
+      && columns (str) != 1 && ! any (str(:,1) != symbols(1)))
+    str = str(:,2:end);
   endif
 
 endfunction
--- a/scripts/strings/dec2bin.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/dec2bin.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} dec2bin (@var{d})
-## @deftypefnx {} {} dec2bin (@var{d}, @var{len})
+## @deftypefn  {} {@var{bstr} =} dec2bin (@var{d})
+## @deftypefnx {} {@var{bstr} =} dec2bin (@var{d}, @var{len})
 ## Return a string of ones and zeros representing the conversion of the integer
 ## @var{d} to a binary number.
 ##
@@ -63,7 +63,7 @@
 ## @seealso{bin2dec, dec2base, dec2hex}
 ## @end deftypefn
 
-function b = dec2bin (d, len)
+function bstr = dec2bin (d, len)
 
   if (nargin == 0)
     print_usage ();
@@ -92,9 +92,9 @@
   endif
 
   if (nargin == 1)
-    b = dec2base (d, 2);
+    bstr = dec2base (d, 2);
   else
-    b = dec2base (d, 2, len);
+    bstr = dec2base (d, 2, len);
   endif
 
 endfunction
--- a/scripts/strings/dec2hex.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/dec2hex.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} dec2hex (@var{d})
-## @deftypefnx {} {} dec2hex (@var{d}, @var{len})
+## @deftypefn  {} {@var{hstr} =} dec2hex (@var{d})
+## @deftypefnx {} {@var{hstr} =} dec2hex (@var{d}, @var{len})
 ## Return a string representing the conversion of the integer @var{d} to a
 ## hexadecimal (base16) number.
 ##
@@ -53,7 +53,7 @@
 ## @seealso{hex2dec, dec2base, dec2bin}
 ## @end deftypefn
 
-function h = dec2hex (d, len)
+function hstr = dec2hex (d, len)
 
   if (nargin == 0)
     print_usage ();
@@ -82,9 +82,9 @@
   endif
 
   if (nargin == 1)
-    h = dec2base (d, 16);
+    hstr = dec2base (d, 16);
   else
-    h = dec2base (d, 16, len);
+    hstr = dec2base (d, 16, len);
   endif
 
 endfunction
--- a/scripts/strings/hex2dec.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/hex2dec.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} hex2dec (@var{s})
+## @deftypefn {} {@var{d} =} hex2dec (@var{str})
 ## Return the integer corresponding to the hexadecimal number represented by
-## the string @var{s}.
+## the string @var{str}.
 ##
 ## For example:
 ##
@@ -39,22 +39,22 @@
 ## @end group
 ## @end example
 ##
-## If @var{s} is a string matrix, return a column vector with one converted
-## number per row of @var{s}; Invalid rows evaluate to NaN@.
+## If @var{str} is a string matrix, return a column vector with one converted
+## number per row of @var{str}; Invalid rows evaluate to NaN@.
 ##
-## If @var{s} is a cell array of strings, return a column vector with one
-## converted number per cell element in @var{s}.
+## If @var{str} is a cell array of strings, return a column vector with one
+## converted number per cell element in @var{str}.
 ##
 ## @seealso{dec2hex, base2dec, bin2dec}
 ## @end deftypefn
 
-function d = hex2dec (s)
+function d = hex2dec (str)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
-  d = base2dec (s, 16);
+  d = base2dec (str, 16);
 
 endfunction
 
@@ -66,4 +66,4 @@
 
 ## Test input validation
 %!error <Invalid call> hex2dec ()
-%!error <S must be a string> hex2dec (1)
+%!error <STR must be a string> hex2dec (1)
--- a/scripts/strings/index.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/index.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} index (@var{s}, @var{t})
-## @deftypefnx {} {} index (@var{s}, @var{t}, @var{direction})
+## @deftypefn  {} {@var{n} =} index (@var{s}, @var{t})
+## @deftypefnx {} {@var{n} =} index (@var{s}, @var{t}, @var{direction})
 ## Return the position of the first occurrence of the string @var{t} in the
 ## string @var{s}, or 0 if no occurrence is found.
 ##
--- a/scripts/strings/regexptranslate.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/regexptranslate.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} regexptranslate (@var{op}, @var{s})
+## @deftypefn {} {@var{str} =} regexptranslate (@var{op}, @var{s})
 ## Translate a string for use in a regular expression.
 ##
 ## This may include either wildcard replacement or special character escaping.
@@ -59,7 +59,7 @@
 ## @seealso{regexp, regexpi, regexprep}
 ## @end deftypefn
 
-function y = regexptranslate (op, s)
+function str = regexptranslate (op, s)
 
   if (nargin != 2)
     print_usage ();
@@ -71,11 +71,11 @@
 
   op = tolower (op);
   if (strcmp ("wildcard", op))
-    y = strrep (strrep (strrep (s, '.', '\.'),
-                                   '*', '.*'),
-                                   '?', '.');
+    str = strrep (strrep (strrep (s, '.', '\.'),
+                                     '*', '.*'),
+                                     '?', '.');
   elseif (strcmp ("escape", op))
-    y = regexprep (s, '([][(){}.*+?^$|\\])', '\\$1');
+    str = regexprep (s, '([][(){}.*+?^$|\\])', '\\$1');
   else
     error ("regexptranslate: invalid operation OP");
   endif
--- a/scripts/strings/rindex.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/rindex.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} rindex (@var{s}, @var{t})
+## @deftypefn {} {@var{n} =} rindex (@var{s}, @var{t})
 ## Return the position of the last occurrence of the character string
 ## @var{t} in the character string @var{s}, or 0 if no occurrence is
 ## found.
--- a/scripts/strings/strcat.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/strcat.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} strcat (@var{s1}, @var{s2}, @dots{})
-## Return a string containing all the arguments concatenated
-## horizontally.
+## @deftypefn {} {@var{str} =} strcat (@var{s1}, @var{s2}, @dots{})
+## Return a string containing all the arguments concatenated horizontally.
 ##
 ## If the arguments are cell strings, @code{strcat} returns a cell string
 ## with the individual cells concatenated.  For numerical input, each element
@@ -83,15 +82,15 @@
 ## @seealso{cstrcat, char, strvcat}
 ## @end deftypefn
 
-function st = strcat (varargin)
+function str = strcat (varargin)
 
   if (nargin == 0)
-    st = "";
+    str = "";
   elseif (nargin == 1)
     if (iscellstr (varargin{1}))
-      st = varargin{1};
+      str = varargin{1};
     elseif (isreal (varargin{1}) || ischar (varargin{1}))
-      st = char (cellstr (varargin{1}));
+      str = char (cellstr (varargin{1}));
     else
       error ("strcat: inputs must be strings or cells of strings");
     endif
@@ -118,11 +117,11 @@
     endif
 
     ## Cellfun handles everything for us.
-    st = cellfun ("horzcat", varargin{:}, uo, false);
+    str = cellfun ("horzcat", varargin{:}, uo, false);
 
     if (allchar)
       ## If all inputs were strings, return strings.
-      st = char (st);
+      str = char (str);
     endif
   endif
 
--- a/scripts/strings/strjust.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/strjust.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} strjust (@var{s})
-## @deftypefnx {} {} strjust (@var{s}, @var{pos})
+## @deftypefn  {} {@var{str} =} strjust (@var{s})
+## @deftypefnx {} {@var{str} =} strjust (@var{s}, @var{pos})
 ## Return the text, @var{s}, justified according to @var{pos}, which may
 ## be @qcode{"left"}, @qcode{"center"}, or @qcode{"right"}.
 ##
@@ -49,7 +49,7 @@
 ## @seealso{deblank, strrep, strtrim, untabify}
 ## @end deftypefn
 
-function y = strjust (s, pos = "right")
+function str = strjust (s, pos = "right")
 
   if (nargin < 1)
     print_usage ();
@@ -58,7 +58,7 @@
   endif
 
   if (isempty (s))
-    y = s;
+    str = s;
     return;
   endif
 
@@ -97,8 +97,8 @@
   jdx += shift(idx);
 
   ## Create a blank matrix and position the nonblank characters.
-  y = repmat (" ", nr, nc);
-  y(sub2ind ([nr, nc], idx, jdx)) = s(nonbl);
+  str = repmat (" ", nr, nc);
+  str(sub2ind ([nr, nc], idx, jdx)) = s(nonbl);
 
 endfunction
 
--- a/scripts/strings/strtrim.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/strtrim.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} strtrim (@var{s})
+## @deftypefn {} {@var{s} =} strtrim (@var{s})
 ## Remove leading and trailing whitespace from @var{s}.
 ##
 ## If @var{s} is a matrix, @var{strtrim} trims each row to the length of
--- a/scripts/strings/strtrunc.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/strtrunc.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} strtrunc (@var{s}, @var{n})
+## @deftypefn {} {@var{s} =} strtrunc (@var{s}, @var{n})
 ## Truncate the character string @var{s} to length @var{n}.
 ##
 ## If @var{s} is a character matrix, then the number of columns is adjusted.
--- a/scripts/strings/substr.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/substr.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} substr (@var{s}, @var{offset})
+## @deftypefn  {} {@var{str} =} substr (@var{s}, @var{offset})
 ## @deftypefnx {} {} substr (@var{s}, @var{offset}, @var{len})
 ## Return the substring of @var{s} which starts at character number
 ## @var{offset} and is @var{len} characters long.
@@ -52,7 +52,7 @@
 ## This function is patterned after the equivalent function in Perl.
 ## @end deftypefn
 
-function t = substr (s, offset, len)
+function str = substr (s, offset, len)
 
   if (nargin < 2)
     print_usage ();
@@ -91,7 +91,7 @@
     error ("substr: No overlap with chosen values of OFFSET and LEN");
   endif
 
-  t = s(:, offset:eos);
+  str = s(:, offset:eos);
 
 endfunction
 
--- a/scripts/strings/untabify.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/strings/untabify.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,9 +24,9 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} untabify (@var{t})
-## @deftypefnx {} {} untabify (@var{t}, @var{tw})
-## @deftypefnx {} {} untabify (@var{t}, @var{tw}, @var{deblank})
+## @deftypefn  {} {@var{str} =} untabify (@var{t})
+## @deftypefnx {} {@var{str} =} untabify (@var{t}, @var{tw})
+## @deftypefnx {} {@var{str} =} untabify (@var{t}, @var{tw}, @var{deblank})
 ## Replace TAB characters in @var{t} with spaces.
 ##
 ## The input, @var{t}, may be either a 2-D character array, or a cell array of
@@ -55,7 +55,7 @@
 ## @seealso{strjust, strsplit, deblank}
 ## @end deftypefn
 
-function s = untabify (t, tw = 8, deblank_arg = false)
+function str = untabify (t, tw = 8, deblank_arg = false)
 
   if (nargin < 1)
     print_usage ();
@@ -64,13 +64,13 @@
   endif
 
   if (ischar (t))
-    s = replace_tabs (t, tw);
+    str = replace_tabs (t, tw);
   else
-    s = cellfun (@replace_tabs, t, {tw}, "uniformoutput", false);
+    str = cellfun (@replace_tabs, t, {tw}, "uniformoutput", false);
   endif
 
   if (deblank_arg)
-    s = deblank (s);
+    str = deblank (str);
   endif
 
 endfunction
--- a/scripts/testfun/__have_feature__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/testfun/__have_feature__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,11 +24,11 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __have_feature__ (feature)
+## @deftypefn {} {@var{tf} =} __have_feature__ (feature)
 ## Undocumented internal function.
 ## @end deftypefn
 
-function retval = __have_feature__ (feature)
+function tf = __have_feature__ (feature)
 
   if (strncmp (feature, "ENABLE_", 7))
     features = __octave_config_info__ ();
@@ -37,12 +37,12 @@
   endif
 
   if (iscellstr (feature))
-    retval = (all (isfield (features, feature))
+    tf = (all (isfield (features, feature))
               && all (cellfun (@(x) features.(x), feature)));
   elseif (ischar (feature))
-    retval = isfield (features, feature) && features.(feature);
+    tf = isfield (features, feature) && features.(feature);
   else
-    retval = false;
+    tf = false;
   endif
 
 endfunction
--- a/scripts/testfun/__prog_output_assert__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/testfun/__prog_output_assert__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,19 +24,19 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} __prog_output_assert__ (@var{str})
+## @deftypefn {} {@var{retval} =} __prog_output_assert__ (@var{str})
 ## Undocumented internal function.
 ## @end deftypefn
 
-function ret = __prog_output_assert__ (str)
+function retval = __prog_output_assert__ (str)
   global __assert_printf__ = "";
 
   if (isempty (__assert_printf__))
-    ret = isempty (str);
+    retval = isempty (str);
   elseif (__assert_printf__(end) == "\n")
-    ret = strcmp (__assert_printf__(1:(end-1)), str);
+    retval = strcmp (__assert_printf__(1:(end-1)), str);
   else
-    ret = strcmp (__assert_printf__, str);
+    retval = strcmp (__assert_printf__, str);
   endif
 
   __assert_printf__ = "";
--- a/scripts/testfun/__run_test_suite__.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/testfun/__run_test_suite__.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,8 +24,8 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} __run_test_suite__ (@var{fcndirs}, @var{fixedtestdirs})
-## @deftypefnx {} {} __run_test_suite__ (@var{fcndirs}, @var{fixedtestdirs}, @var{topsrcdir}, @var{topbuilddir})
+## @deftypefn  {} {[@var{pass}, @var{fail}, @var{xfail}, @var{xbug}, @var{skip}, @var{rtskip}, @var{regress}]} __run_test_suite__ (@var{fcndirs}, @var{fixedtestdirs})
+## @deftypefnx {} {[@var{pass}, @var{fail}, @var{xfail}, @var{xbug}, @var{skip}, @var{rtskip}, @var{regress}]} __run_test_suite__ (@var{fcndirs}, @var{fixedtestdirs}, @var{topsrcdir}, @var{topbuilddir})
 ## Undocumented internal function.
 ## @end deftypefn
 
--- a/scripts/testfun/example.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/testfun/example.m	Wed Mar 30 20:40:27 2022 -0700
@@ -28,7 +28,7 @@
 ## @deftypefnx {} {} example @var{name} @var{n}
 ## @deftypefnx {} {} example ("@var{name}")
 ## @deftypefnx {} {} example ("@var{name}", @var{n})
-## @deftypefnx {} {[@var{s}, @var{idx}] =} example (@dots{})
+## @deftypefnx {} {[@var{codestr}, @var{codeidx}] =} example (@dots{})
 ##
 ## Display the code for example @var{n} associated with the function
 ## @var{name}, but do not run it.
@@ -36,14 +36,14 @@
 ## If @var{n} is not specified, all examples are displayed.
 ##
 ## When called with output arguments, the examples are returned in the form of
-## a string @var{s}, with @var{idx} indicating the ending position of the
-## various examples.
+## a string @var{codestr}, with @var{codeidx} indicating the ending position of
+## the various examples.
 ##
 ## For a complete explanation @pxref{XREFdemo,,@code{demo}}.
 ## @seealso{demo, test}
 ## @end deftypefn
 
-function [ex_code, ex_idx] = example (name, n = 0)
+function [codestr, codeidx] = example (name, n = 0)
 
   if (nargin < 1)
     print_usage ();
@@ -74,15 +74,15 @@
   if (nargout > 0)
     if (n > 0)
       if (n <= length (idx))
-        ex_code = code(idx(n):idx(n+1)-1);
-        ex_idx = [1, length(ex_code)+1];
+        codestr = code(idx(n):idx(n+1)-1);
+        codeidx = [1, length(codestr)+1];
       else
-        ex_code = "";
-        ex_idx = [];
+        codestr = "";
+        codeidx = [];
       endif
     else
-      ex_code = code;
-      ex_idx = idx;
+      codestr = code;
+      codeidx = idx;
     endif
   else
     if (n > 0)
--- a/scripts/testfun/fail.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/testfun/fail.m	Wed Mar 30 20:40:27 2022 -0700
@@ -27,10 +27,10 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn  {} {} fail (@var{code})
-## @deftypefnx {} {} fail (@var{code}, @var{pattern})
-## @deftypefnx {} {} fail (@var{code}, "warning")
-## @deftypefnx {} {} fail (@var{code}, "warning", @var{pattern})
+## @deftypefn  {} {@var{status} =} fail (@var{code})
+## @deftypefnx {} {@var{status} =} fail (@var{code}, @var{pattern})
+## @deftypefnx {} {@var{status} =} fail (@var{code}, "warning")
+## @deftypefnx {} {@var{status} =} fail (@var{code}, "warning", @var{pattern})
 ##
 ## Return true if @var{code} fails with an error message matching
 ## @var{pattern}, otherwise produce an error.
@@ -65,7 +65,7 @@
 ## @seealso{assert, error}
 ## @end deftypefn
 
-function retval = fail (code, pattern, warning_pattern)
+function status = fail (code, pattern, warning_pattern)
 
   if (nargin < 1)
     print_usage ();
@@ -95,7 +95,7 @@
 
   ## Allow assert (fail ())
   if (nargout)
-    retval = true;
+    status = true;
   endif
 
   if (test_warning)
--- a/scripts/time/asctime.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/time/asctime.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} asctime (@var{tm_struct})
+## @deftypefn {} {@var{str} =} asctime (@var{tm_struct})
 ## Convert a time structure to a string using the following
 ## format: @qcode{"ddd mmm mm HH:MM:SS yyyy@backslashchar{}n"}.
 ##
@@ -41,13 +41,13 @@
 ## @seealso{ctime, localtime, time}
 ## @end deftypefn
 
-function retval = asctime (tm_struct)
+function str = asctime (tm_struct)
 
   if (nargin < 1)
     print_usage ();
   endif
 
-  retval = strftime ("%a %b %d %H:%M:%S %Y\n", tm_struct);
+  str = strftime ("%a %b %d %H:%M:%S %Y\n", tm_struct);
 
 endfunction
 
--- a/scripts/time/calendar.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/time/calendar.m	Wed Mar 30 20:40:27 2022 -0700
@@ -41,7 +41,7 @@
 ## @seealso{datenum, datestr}
 ## @end deftypefn
 
-function varargout = calendar (varargin)
+function c = calendar (y, m)
 
   switch (nargin)
     case 0
@@ -49,31 +49,30 @@
       y = v(1);
       m = v(2);
       d = v(3);
+
     case 1
-      v = datevec (varargin{1});
+      v = datevec (y);
       y = v(1);
       m = v(2);
       d = v(3);
+
     case 2
-      y = varargin{1};
-      m = varargin{2};
       d = [];
-    otherwise
-      print_usage ();
+
   endswitch
 
-  c = zeros (7, 6);
+  cal = zeros (7, 6);
   dayone = datenum (y, m, 1);
   ndays = eomday (y, m);
-  c(weekday (dayone) - 1 + [1:ndays]) = 1:ndays;
+  cal(weekday (dayone) - 1 + [1:ndays]) = 1:ndays;
 
   if (nargout > 0)
-    varargout{1} = c';
+    c = cal';
   else
     ## Layout the calendar days, 6 columns per day, 7 days per row.
-    str = sprintf ("    %2d    %2d    %2d    %2d    %2d    %2d    %2d\n", c);
+    str = sprintf ("    %2d    %2d    %2d    %2d    %2d    %2d    %2d\n", cal);
 
-    ## Print an asterisk before the specified date
+    ## Print an asterisk before the specified date.
     if (! isempty (d))
       pos = weekday (dayone) + d - 1;
       idx = 6*pos + fix (pos / 7.1) - ifelse (d < 10, 1, 2);
@@ -101,6 +100,3 @@
 
 %!assert ((calendar(2000,2))'(2:31), [0:29])
 %!assert ((calendar(1957,10))'(2:33), [0:31])
-
-## Test input validation
-%!error calendar (1,2,3)
--- a/scripts/time/ctime.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/time/ctime.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} ctime (@var{t})
+## @deftypefn {} {@var{str} =} ctime (@var{t})
 ## Convert a value returned from @code{time} (or any other non-negative
 ## integer), to the local time and return a string of the same form as
 ## @code{asctime}.
@@ -41,13 +41,13 @@
 ## @seealso{asctime, time, localtime}
 ## @end deftypefn
 
-function retval = ctime (t)
+function str = ctime (t)
 
-  if (nargin < 1)
+  if (nargin != 1)
     print_usage ();
   endif
 
-  retval = asctime (localtime (t));
+  str = asctime (localtime (t));
 
 endfunction
 
--- a/scripts/time/date.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/time/date.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} date ()
+## @deftypefn {} {@var{str} =} date ()
 ## Return the current date as a character string in the form DD-MMM-YYYY@.
 ##
 ## For example:
@@ -38,9 +38,9 @@
 ## @seealso{now, clock, datestr, localtime}
 ## @end deftypefn
 
-function retval = date ()
+function str = date ()
 
-  retval = strftime ("%d-%b-%Y", localtime (time ()));
+  str = strftime ("%d-%b-%Y", localtime (time ()));
 
 endfunction
 
--- a/scripts/time/etime.m	Wed Mar 30 17:30:18 2022 -0700
+++ b/scripts/time/etime.m	Wed Mar 30 20:40:27 2022 -0700
@@ -24,7 +24,7 @@
 ########################################################################
 
 ## -*- texinfo -*-
-## @deftypefn {} {} etime (@var{t2}, @var{t1})
+## @deftypefn {} {@var{secs} =} etime (@var{t2}, @var{t1})
 ## Return the difference in seconds between two time values returned from
 ## @code{clock} (@math{@var{t2} - @var{t1}}).
 ##