Mercurial > octave
changeset 31665:a1e7e0b62765
maint: merge stable to default
author | Rik <rik@octave.org> |
---|---|
date | Mon, 12 Dec 2022 14:36:06 -0800 |
parents | a74935a6cc75 (current diff) 505ed551e366 (diff) |
children | 6a66c157fa53 |
files | |
diffstat | 26 files changed, 191 insertions(+), 69 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/@ftp/loadobj.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/@ftp/loadobj.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,16 @@ ## ######################################################################## +## @deftypefn {} {@var{b} =} loadobj (@var{a}) +## Method of a class to manipulate an object after loading it from a file. +## +## The function @code{loadobj} is called when the object @var{a} is loaded +## using the @code{load} function. An example of the use of @code{saveobj} +## might be to add fields to an object that don't make sense to be saved. +## +## @seealso{saveobj, class} +## @end deftypefn + function b = loadobj (a) b = a; @@ -36,7 +46,7 @@ endif b = rmfield (b, "dir"); elseif (isfield (b, "remotePwd")) - ## FIXME: Can we read matlab java stringBuffer objects? + ## FIXME: Can we read Matlab java stringBuffer objects? warning ("@ftp/loadobj: can not change remote directory in loaded FTP object"); b = rmfield (b, "remotePwd"); endif
--- a/scripts/@ftp/saveobj.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/@ftp/saveobj.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,19 @@ ## ######################################################################## +## -*- texinfo -*- +## @deftypefn {} {@var{b} =} saveobj (@var{a}) +## Method of a class to manipulate an object prior to saving it to a file. +## +## The function @code{saveobj} is called when the object @var{a} is saved +## using the @code{save} function. An example of the use of @code{saveobj} +## might be to remove fields of the object that don't make sense to be saved +## or it might be used to ensure that certain fields of the object are +## initialized before the object is saved. +## +## @seealso{loadobj, class} +## @end deftypefn + function b = saveobj (a) b = a; b = rmfield (b, "curlhandle");
--- a/scripts/audio/record.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/audio/record.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,8 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} record (@var{sec}) -## @deftypefnx {} {} record (@var{sec}, @var{fs}) +## @deftypefn {} {@var{data} =} record (@var{sec}) +## @deftypefnx {} {@var{data} =} record (@var{sec}, @var{fs}) ## Record @var{sec} seconds of audio from the system's default audio input at ## a sampling rate of 8000 samples per second. ##
--- a/scripts/gui/private/__file_filter__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/gui/private/__file_filter__.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,7 +24,7 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} __file_filter__ (@var{caller}, @var{file_filter}) +## @deftypefn {} {[retval, defname, defdir] =} __file_filter__ (@var{caller}, @var{file_filter}) ## Undocumented internal function. ## @end deftypefn
--- a/scripts/gui/uipushtool.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/gui/uipushtool.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,10 +24,10 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} uipushtool () -## @deftypefnx {} {} uipushtool (@var{property}, @var{value}, @dots{}) -## @deftypefnx {} {} uipushtool (@var{parent}) -## @deftypefnx {} {} uipushtool (@var{parent}, @var{property}, @var{value}, @dots{}) +## @deftypefn {} {@var{hui} =} uipushtool () +## @deftypefnx {} {@var{hui} =} uipushtool (@var{property}, @var{value}, @dots{}) +## @deftypefnx {} {@var{hui} =} uipushtool (@var{parent}) +## @deftypefnx {} {@var{hui} =} uipushtool (@var{parent}, @var{property}, @var{value}, @dots{}) ## ## Create a uipushtool object. ##
--- a/scripts/image/private/__imfinfo__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/image/private/__imfinfo__.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,10 +23,17 @@ ## ######################################################################## -## This function does all the work of imfinfo. It exists here as private -## function so that imfinfo can use other functions if imformats is -## configured to. It is also needed so that imformats can create a -## function handle for it. +## -*- texinfo -*- +## @deftypefn {} {@var{info} =} __imfinfo__ (@var{filename}) +## +## This function does all the work of @code{imfinfo}. +## +## It exists here as private function so that @code{imfinfo} can use other +## functions if @code{imformats} is configured to. It is also needed so that +## @code{imformats} can create a function handle for it. +## +## @seealso{imfinfo} +## @end deftypefn function info = __imfinfo__ (filename)
--- a/scripts/image/private/__imread__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/image/private/__imread__.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,10 +23,22 @@ ## ######################################################################## -## This function does all the work of imread. It exists here as private -## function so that imread can use other functions if imformats is -## configured to. It is also needed so that imformats can create a -## function handle for it. +## -*- texinfo -*- +## @deftypefn {} {[@var{img}, @var{map}, @var{alpha}] =} __imread__ (@var{filename}) +## @deftypefnx {} {[@dots{}] =} __imread__ (@var{url}) +## @deftypefnx {} {[@dots{}] =} __imread__ (@dots{}, @var{ext}) +## @deftypefnx {} {[@dots{}] =} __imread__ (@dots{}, @var{idx}) +## @deftypefnx {} {[@dots{}] =} __imread__ (@dots{}, @var{param1}, @var{value1}, @dots{}) +## @deftypefnx {} {@var{info} =} __imread__ (@var{filename}) +## +## This function does all the work of @code{imread}. +## +## It exists here as private function so that @code{imread} can use other +## functions if @code{imformats} is configured to. It is also needed so that +## @code{imformats} can create a function handle for it. +## +## @seealso{imread} +## @end deftypefn function varargout = __imread__ (filename, varargin)
--- a/scripts/image/private/colorspace_conversion_revert.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/image/private/colorspace_conversion_revert.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,11 +23,16 @@ ## ######################################################################## -## Private function the functions that convert between color spaces, i.e., -## rgb2ntsc, rgb2hsv, hsv2rgb, and ntsc2rgb. This reverts a colormap type -## into the same shape and class as it was in the input. The flags are meant -## to come from complementary private function -## colorspace_conversion_input_check() +## -*- texinfo -*- +## @deftypefn {} {@var{rv} =} colorspace_conversion_revert (@var{rv}, @var{sz}, @var{is_im}, @var{is_nd}) +## +## Private function that converts between color spaces. +## +## This reverts a colormap type into the same shape and class as it was in the +## input. The flags are meant to come from complementary private function +## @code{colorspace_conversion_input_check}. +## @seealso{hsv2rgb, rgb2grap, rgb2hsv, colorspace_conversion_input_check} +## @end deftypefn function rv = colorspace_conversion_revert (rv, sz, is_im, is_nd)
--- a/scripts/image/private/imageIO.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/image/private/imageIO.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,28 +23,44 @@ ## ######################################################################## -## This function the image input functions imread() and imfinfo() to the -## functions that will actually be used, based on their format. See below -## on the details on how it identifies the format, and to what it defaults. +## -*- texinfo -*- +## @deftypefn {} {@var{varargout} =} imageIO (@var{fcn}, @var{core_fcn}, @var{fieldname}, @var{filename}, @var{varargin}) ## -## It will change the input arguments that were passed to imread() and -## imfinfo(). It will change the filename to provide the absolute filepath -## for the file, it will extract the possible format name from the rest of -## the input arguments (in case there was one), and will give an error if -## the file can't be found. +## This function bridges the image input functions @code{imread} and +## @code{imfinfo} to the functions that will actually be used, based on their +## format. See below for the details on how it identifies the format, and what +## the defaults are. +## +## It will change the input arguments that were passed to @code{imread} and +## @code{imfinfo}. It will change the filename to provide the absolute +## filepath for the file, it will extract the possible format name from the +## rest of the input arguments (in case there was one), and will give an error +## if the file can't be found. ## ## Usage: ## -## fcn - Function name to use on error message. -## core_fcn - Function handle for the default function to use if we can't -## find the format in imformats. -## fieldname - Name of the field in the struct returned by imformats that -## has the function to use. -## filename - Most likely the first input argument from the function that -## called this. May be missing the file extension which can be -## on varargin. -## varargin - Followed by all the OTHER arguments passed to imread and -## imfinfo. +## @table @var +## @item fcn +## Function name to use in error message. +## +## @item core_fcn +## Function handle for the default function to use if we can't find the format +## in imformats. +## +## @item fieldname +## Name of the field in the struct returned by imformats that has the function +## to use. +## +## @item filename +## Most likely the first input argument from the function that called this. +## May be missing the file extension which can be on varargin. +## +## @item varargin +## Followed by all the OTHER arguments passed to imread and imfinfo. +## @end table +## +## @seealso{imread, imwrite} +## @end deftypefn function varargout = imageIO (fcn, core_fcn, fieldname, filename, varargin)
--- a/scripts/image/private/imwrite_filename.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/image/private/imwrite_filename.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,17 +23,23 @@ ## ######################################################################## -## The input check for imwrite needs to be done twice, once when imwrite -## is called the first time to find where the filename is, and a second -## time by __imwrite__ after imformats decides what function to use. -## Because a user can, and is encouraged to, get a function handle to -## __imwrite__, the input check is also done there. -## In addition, the input check for imwrite is not that straightforward -## in order to support the multiple ways the function can be called, -## and interpretations of Matlab documentation. +## -*- texinfo -*- +## @deftypefn {} {[filename, ext, cmap, options] =} imwrite_filename (@var{varargin}) +## +## The input check for @code{imwrite} needs to be done twice, once when +## @code{imwrite} is called the first time to find where the filename is, and a +## second time by @code{__imwrite__} after imformats decides what function to +## use. Because a user can, and is encouraged to, get a function handle to +## @code{__imwrite__}, the input check is also done there. +## +## In addition, the input check for @code{imwrite} is not that straightforward +## in order to support the multiple ways the function can be called, and +## interpretations of @sc{matlab} documentation. ## ## Anyway, this will only do the input check until it finds the filename -## to be used, the only part that imwrite actually needs. +## to be used, the only part that @code{imwrite} actually needs. +## @seealso{imwrite} +## @end deftypefn function [filename, ext, cmap, options] = imwrite_filename (varargin)
--- a/scripts/image/private/ind2x.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/image/private/ind2x.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,7 +23,12 @@ ## ######################################################################## -## private function for the ind2XXX functions which have a lot of code in common +## -*- texinfo -*- +## @deftypefn {} {[x, map] =} ind2x (@var{caller}, @var{x}, @var{map}) +## +## Private function for the ind2XXX functions which have a lot of code in +## common. +## @end deftypefn function [x, map] = ind2x (caller, x, map)
--- a/scripts/legacy/@inline/feval.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/legacy/@inline/feval.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,14 @@ ## ######################################################################## +## -*- texinfo -*- +## @deftypefn {} {} feval (@var{fobj}, @dots{}) +## Evaluate the inline function in @var{fobj}. +## +## Any arguments after the first are passed as inputs to the function. +## @seealso{inline} +## @end deftypefn + function retval = feval (fobj, varargin) retval = fobj.fh (varargin{:});
--- a/scripts/legacy/isequalwithequalnans.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/legacy/isequalwithequalnans.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,7 +24,7 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} isequalwithequalnans (@var{x1}, @var{x2}, @dots{}) +## @deftypefn {} {@var{tf} =} isequalwithequalnans (@var{x1}, @var{x2}, @dots{}) ## This function is obsolete. Use @code{isequaln} instead. ## @seealso{isequaln} ## @end deftypefn @@ -33,7 +33,7 @@ ## removed in some future version. Now users are told that it should be ## avoided, but there is no mention of possible future removal. -function retval = isequalwithequalnans (varargin) +function tf = isequalwithequalnans (varargin) persistent warned = false; if (! warned) @@ -42,6 +42,6 @@ "isequalwithequalnans is obsolete; please use isequaln instead"); endif - retval = isequaln (varargin{:}); + tf = isequaln (varargin{:}); endfunction
--- a/scripts/ode/private/check_default_input.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/ode/private/check_default_input.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,11 @@ ## ######################################################################## +## -*- texinfo -*- +## @deftypefn {} {@var{fcn} =} check_default_input (@var{fcn}, @var{trange}, @var{solver}, @var{y0}, @var{yp0}) +## Undocumented internal function. +## @end deftypefn + function fcn = check_default_input (fcn, trange, solver, y0, yp0) if (nargin < 4)
--- a/scripts/ode/private/odemergeopts.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/ode/private/odemergeopts.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,11 @@ ## ######################################################################## +## -*- texinfo -*- +## @deftypefn {} {@var{options} =} odemergeopts (@var{caller}, @var{useroptions}, @var{options}, @var{classes}, @var{attributes}, @var{solver}) +## Undocumented internal function. +## @end deftypefn + ## FIXME: there are some calls to odemergeopts with a "solver" argument ## but we don't use that here. Should the calls be fixed or should we ## do something with the solver argument here?
--- a/scripts/ode/private/runge_kutta_interpolate.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/ode/private/runge_kutta_interpolate.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,11 @@ ## ######################################################################## +## -*- texinfo -*- +## @deftypefn {} {@var{u_interp} =} odemergeopts (@var{order}, @var{z}, @var{t}, @var{k_vals}) +## Undocumented internal function. +## @end deftypefn + function u_interp = runge_kutta_interpolate (order, z, u, t, k_vals) switch (order)
--- a/scripts/path/private/getsavepath.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/path/private/getsavepath.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,6 +23,11 @@ ## ######################################################################## +## -*- texinfo -*- +## @deftypefn {} {[@var{filelines}, @var{startline}, @var{endline}] =} getsavepath (@var{file}) +## Undocumented internal function. +## @end deftypefn + function [filelines, startline, endline] = getsavepath (file) beginstring = "## Begin savepath auto-created section, do not edit";
--- a/scripts/plot/appearance/private/__axis_label__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/plot/appearance/private/__axis_label__.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,10 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} __axis_label__ (@var{caller}, @var{hax}, @var{txt}, @dots{}) -## Undocumented internal function. +## @deftypefn {} {} __axis_label__ (@var{hax}, @var{caller}, @var{txt}, @dots{}) +## @deftypefnx {} {@var{h} =} __axis_label__ (@dots{}) +## Internal function with common code for axis labeling functions. +## @seealso{xlabel, ylabel, zlabel, title} ## @end deftypefn function retval = __axis_label__ (hax, caller, txt, varargin)
--- a/scripts/plot/appearance/private/__axis_limits__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/plot/appearance/private/__axis_limits__.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,16 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} __axis_limits__ (@var{fcn}, @dots{}) -## Undocumented internal function. +## @deftypefn {} {@var{limits} =} __axis_limits__ (@var{fcn}) +## @deftypefnx {} {@var{xmode} =} __axis_limits__ (@var{fcn}, "mode") +## @deftypefnx {} {} __axis_limits__ (@var{fcn}, [@var{x_lo} @var{x_hi}]) +## @deftypefnx {} {} __axis_limits__ (@var{fcn}, "auto") +## @deftypefnx {} {} __axis_limits__ (@var{fcn}, "manual") +## @deftypefnx {} {} __axis_limits__ (@var{fcn}, @var{hax}, @dots{}) +## @deftypefn {} {@var{old_limits} =} __axis_limits__ (@var{fcn}, @dots{}) +## Internal function that implements common code to query or set the axis +## limits for a plot. +## @seealso{xlim, ylim, zlim, title} ## @end deftypefn function retval = __axis_limits__ (fcn, varargin)
--- a/scripts/plot/draw/private/__bar__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/plot/draw/private/__bar__.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,10 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} __bar__ (@var{vertical}, @var{fcn}, @dots{}) -## Undocumented internal function. +## @deftypefn {} {@var{varargout} =} __bar__ (@var{fcn}, @var{vertical}, @dots{}) +## Internal function with common code to implement @code{bar} and @code{barh} +## plots. +## @seealso{bar, barh} ## @end deftypefn function varargout = __bar__ (fcn, vertical, varargin)
--- a/scripts/plot/draw/private/__plt__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/plot/draw/private/__plt__.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,9 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} __plt__ (@var{caller}, @var{hp}, @var{varargin}) -## Undocumented internal function. +## @deftypefn {} {@var{h} =} __plt__ (@var{caller}, @var{hp}, @var{varargin}) +## Internal function with common code to implement several 2-D plot types. +## @seealso{plot, polar, loglog, semilogx, semilogy} ## @end deftypefn function retval = __plt__ (caller, hp, varargin)
--- a/scripts/set/private/validsetargs.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/set/private/validsetargs.m Mon Dec 12 14:36:06 2022 -0800 @@ -23,7 +23,12 @@ ## ######################################################################## -## Validate arguments for binary set operation. +## -*- texinfo -*- +## @deftypefn {} {[x, y] =} validsetargs (@var{caller}, @var{x}, @var{y}, @var{varargin}) +## Internal function to validate arguments passed to functions operating on +## sets. +## @seealso{intersect, ismember, setdiff, setxor, union} +## @end deftypefn function [x, y] = validsetargs (caller, x, y, varargin)
--- a/scripts/signal/ifftshift.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/signal/ifftshift.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,8 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} ifftshift (@var{x}) -## @deftypefnx {} {} ifftshift (@var{x}, @var{dim}) +## @deftypefn {} {@var{y} =} ifftshift (@var{x}) +## @deftypefnx {} {@var{y} =} ifftshift (@var{x}, @var{dim}) ## Undo the action of the @code{fftshift} function. ## ## For even length @var{x}, @code{fftshift} is its own inverse, but odd lengths
--- a/scripts/signal/private/triangle_sw.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/signal/private/triangle_sw.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,9 +24,11 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} triangle_sw (@var{n}, @var{b}) -## Triangular spectral window. Subfunction used for spectral density -## estimation. +## @deftypefn {} {@var{retval} =} triangle_sw (@var{n}, @var{b}) +## Triangular spectral window. +## +## Subfunction used for spectral density estimation. +## @seealso{spectral_xdf} ## @end deftypefn function retval = triangle_sw (n, b)
--- a/scripts/strings/bin2dec.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/strings/bin2dec.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,7 +24,7 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} bin2dec (@var{str}) +## @deftypefn {} {@var{d} =} bin2dec (@var{str}) ## Return the decimal number corresponding to the binary number represented ## by the string @var{str}. ##
--- a/scripts/testfun/__run_test_suite__.m Sat Dec 10 00:30:20 2022 -0500 +++ b/scripts/testfun/__run_test_suite__.m Mon Dec 12 14:36:06 2022 -0800 @@ -24,8 +24,8 @@ ######################################################################## ## -*- texinfo -*- -## @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}) +## @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