# HG changeset patch # User Rik # Date 1649093508 25200 # Node ID 32d2b6604a9f4ee4e6b1f1dda35cec32ce07f086 # Parent 4bab8d3fce797893421dba6c7d90432bdd7d99b5 doc: Ensure documentation lists output argument when it exists for functions in libinterp/ 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. * __ftp__.cc, __magick_read__.cc, __pchip_deriv__.cc, bitfcns.cc, bsxfun.cc, call-stack.cc, cellfun.cc, chol.cc, conv2.cc, data.cc, debug.cc, defaults.cc, det.cc, dirfns.cc, display.cc, dot.cc, error.cc, event-manager.cc, fft.cc, fft2.cc, fftn.cc, file-io.cc, getgrent.cc, getpwent.cc, getrusage.cc, graphics.cc, hash.cc, help.cc, input.cc, interpreter.cc, kron.cc, load-path.cc, mappers.cc, max.cc, nproc.cc, oct-hist.cc, pager.cc, pinv.cc, psi.cc, rand.cc, settings.cc, sighandlers.cc, stream-euler.cc, strfns.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, utils.cc, variables.cc, __fltk_uigetfile__.cc, audiodevinfo.cc, audioread.cc, fftw.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-java.cc, ov-struct.cc, ov-typeinfo.cc, ov-usr-fcn.cc, ov.cc, octave.cc, profiler.cc: Add return arguments to @deftypefn macros where they were missing. Attempt to use standard naming convention for return variables. Occasionally improved the docstring itself by re-wording or adding code examples. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/__ftp__.cc --- a/libinterp/corefcn/__ftp__.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/__ftp__.cc Mon Apr 04 10:31:48 2022 -0700 @@ -82,7 +82,7 @@ DEFMETHOD (__ftp_pwd__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __ftp_pwd__ (@var{handle}) +@deftypefn {} {@var{pwd} =} __ftp_pwd__ (@var{handle}) Undocumented internal function @end deftypefn */) { @@ -122,7 +122,8 @@ DEFMETHOD (__ftp_dir__, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} __ftp_dir__ (@var{handle}) +@deftypefn {} {} __ftp_dir__ (@var{handle}) +@deftypefnx {} {@var{S} =} __ftp_dir__ (@var{handle}) Undocumented internal function @end deftypefn */) { @@ -248,7 +249,7 @@ DEFMETHOD (__ftp_mode__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __ftp_mode__ (@var{handle}) +@deftypefn {} {@var{mode} =} __ftp_mode__ (@var{handle}) Undocumented internal function @end deftypefn */) { @@ -345,7 +346,8 @@ DEFMETHOD (__ftp_mput__, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} __ftp_mput__ (@var{handle}, @var{files}) +@deftypefn {} {} __ftp_mput__ (@var{handle}, @var{files}) +@deftypefnx {} {@var{filelist} =} __ftp_mput__ (@var{handle}, @var{files}) Undocumented internal function @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/__magick_read__.cc --- a/libinterp/corefcn/__magick_read__.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/__magick_read__.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1677,7 +1677,7 @@ // done in Octave language), and then again for the actual reading. DEFUN (__magick_ping__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __magick_ping__ (@var{fname}, @var{idx}) +@deftypefn {} {@var{fmt} =} __magick_ping__ (@var{fname}, @var{idx}) Ping image information with GraphicsMagick or ImageMagick. This is a private internal function not intended for direct use. @@ -1910,7 +1910,7 @@ DEFUN (__magick_finfo__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __magick_finfo__ (@var{fname}) +@deftypefn {} {@var{infostruct} =} __magick_finfo__ (@var{fname}) Read image information with GraphicsMagick or ImageMagick. This is a private internal function not intended for direct use. @@ -2361,7 +2361,7 @@ DEFUN (__magick_formats__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __magick_imformats__ (@var{formats}) +@deftypefn {} {@var{fmt_struct} =} __magick_imformats__ (@var{formats}) Fill formats info with GraphicsMagick CoderInfo. @seealso{imfinfo, imformats, imread, imwrite} diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/__pchip_deriv__.cc --- a/libinterp/corefcn/__pchip_deriv__.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/__pchip_deriv__.cc Mon Apr 04 10:31:48 2022 -0700 @@ -43,7 +43,7 @@ DEFUN (__pchip_deriv__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __pchip_deriv__ (@var{x}, @var{y}, @var{dim}) +@deftypefn {} {@var{d} =} __pchip_deriv__ (@var{x}, @var{y}, @var{dim}) Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/bitfcns.cc --- a/libinterp/corefcn/bitfcns.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/bitfcns.cc Mon Apr 04 10:31:48 2022 -0700 @@ -361,7 +361,7 @@ DEFUN (bitand, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} bitand (@var{x}, @var{y}) +@deftypefn {} {@var{z} =} bitand (@var{x}, @var{y}) Return the bitwise AND of non-negative integers. @var{x}, @var{y} must be in the range [0,intmax] @@ -377,7 +377,7 @@ DEFUN (bitor, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} bitor (@var{x}, @var{y}) +@deftypefn {} {@var{z} =} bitor (@var{x}, @var{y}) Return the bitwise OR of non-negative integers @var{x} and @var{y}. @seealso{bitor, bitxor, bitset, bitget, bitcmp, bitshift, intmax, flintmax} @@ -392,7 +392,7 @@ DEFUN (bitxor, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} bitxor (@var{x}, @var{y}) +@deftypefn {} {@var{z} =} bitxor (@var{x}, @var{y}) Return the bitwise XOR of non-negative integers @var{x} and @var{y}. @seealso{bitand, bitor, bitset, bitget, bitcmp, bitshift, intmax, flintmax} @@ -536,14 +536,13 @@ DEFUN (bitshift, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} bitshift (@var{a}, @var{k}) -@deftypefnx {} {} bitshift (@var{a}, @var{k}, @var{n}) -Return a @var{k} bit shift of @var{n}-digit unsigned integers in @var{a}. +@deftypefn {} {@var{B} =} bitshift (@var{A}, @var{k}) +@deftypefnx {} {@var{B} =} bitshift (@var{A}, @var{k}, @var{n}) +Return a @var{k} bit shift of @var{n}-digit unsigned integers in @var{A}. A positive @var{k} leads to a left shift; A negative value to a right shift. -If @var{n} is omitted it defaults to 64. -@var{n} must be in the range [1,64]. +If @var{n} is omitted it defaults to 64. @var{n} must be in the range [1,64]. @example @group @@ -658,10 +657,10 @@ DEFUN (flintmax, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} flintmax () -@deftypefnx {} {} flintmax ("double") -@deftypefnx {} {} flintmax ("single") -@deftypefnx {} {} flintmax (@var{var}) +@deftypefn {} {@var{Imax} =} flintmax () +@deftypefnx {} {@var{Imax} =} flintmax ("double") +@deftypefnx {} {@var{Imax} =} flintmax ("single") +@deftypefnx {} {@var{Imax} =} flintmax (@var{var}) Return the largest integer that can be represented consecutively in a floating point value. @@ -726,9 +725,9 @@ DEFUN (intmax, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} intmax () -@deftypefnx {} {} intmax ("@var{type}") -@deftypefnx {} {} intmax (@var{var}) +@deftypefn {} {@var{Imax} =} intmax () +@deftypefnx {} {@var{Imax} =} intmax ("@var{type}") +@deftypefnx {} {@var{Imax} =} intmax (@var{var}) Return the largest integer that can be represented by a specific integer type. The input is either a string @qcode{"@var{type}"} specifying an integer type, @@ -840,9 +839,9 @@ DEFUN (intmin, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} intmin () -@deftypefnx {} {} intmin ("@var{type}") -@deftypefnx {} {} intmin (@var{var}) +@deftypefn {} {@var{Imin} =} intmin () +@deftypefnx {} {@var{Imin} =} intmin ("@var{type}") +@deftypefnx {} {@var{Imin} =} intmin (@var{var}) Return the smallest integer that can be represented by a specific integer type. The input is either a string @qcode{"@var{type}"} specifying an integer type, @@ -954,13 +953,13 @@ DEFUN (sizemax, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sizemax () +@deftypefn {} {@var{max_numel} =} sizemax () Return the largest value allowed for the size of an array. If Octave is compiled with 64-bit indexing, the result is of class int64, -otherwise it is of class int32. The maximum array size is slightly -smaller than the maximum value allowable for the relevant class as reported -by @code{intmax}. +otherwise it is of class int32. The maximum array size is slightly smaller +than the maximum value allowable for the relevant class as reported by +@code{intmax}. @seealso{intmax} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/bsxfun.cc --- a/libinterp/corefcn/bsxfun.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/bsxfun.cc Mon Apr 04 10:31:48 2022 -0700 @@ -324,7 +324,7 @@ DEFMETHOD (bsxfun, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} bsxfun (@var{f}, @var{A}, @var{B}) +@deftypefn {} {@var{C} =} bsxfun (@var{f}, @var{A}, @var{B}) Apply a binary function @var{f} element-by-element to two array arguments @var{A} and @var{B}, expanding singleton dimensions in either input argument as necessary. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/call-stack.cc --- a/libinterp/corefcn/call-stack.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/call-stack.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1174,7 +1174,7 @@ @deftypefn {} {} who @deftypefnx {} {} who pattern @dots{} @deftypefnx {} {} who option pattern @dots{} -@deftypefnx {} {C =} who ("pattern", @dots{}) +@deftypefnx {} {C =} who (@dots{}) List currently defined variables matching the given patterns. Valid pattern syntax is the same as described for the @code{clear} command. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/cellfun.cc --- a/libinterp/corefcn/cellfun.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/cellfun.cc Mon Apr 04 10:31:48 2022 -0700 @@ -270,20 +270,21 @@ DEFMETHOD (cellfun, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} cellfun (@var{name}, @var{C}) -@deftypefnx {} {} cellfun ("size", @var{C}, @var{k}) -@deftypefnx {} {} cellfun ("isclass", @var{C}, @var{class}) -@deftypefnx {} {} cellfun (@var{func}, @var{C}) -@deftypefnx {} {} cellfun (@var{func}, @var{C}, @var{D}) -@deftypefnx {} {[@var{a}, @dots{}] =} cellfun (@dots{}) -@deftypefnx {} {} cellfun (@dots{}, "ErrorHandler", @var{errfunc}) -@deftypefnx {} {} cellfun (@dots{}, "UniformOutput", @var{val}) +@deftypefn {} {@var{A} =} cellfun ("@var{fcn}", @var{C}) +@deftypefnx {} {@var{A} =} cellfun ("size", @var{C}, @var{k}) +@deftypefnx {} {@var{A} =} cellfun ("isclass", @var{C}, @var{class}) +@deftypefnx {} {@var{A} =} cellfun (@@@var{fcn}, @var{C}) +@deftypefnx {} {@var{A} =} cellfun (@var{fcn}, @var{C}) +@deftypefnx {} {@var{A} =} cellfun (@var{fcn}, @var{C1}, @var{C2}, @dots{}) +@deftypefnx {} {[@var{A1}, @var{A2}, @dots{}] =} cellfun (@dots{}) +@deftypefnx {} {@var{A} =} cellfun (@dots{}, "ErrorHandler", @var{errfunc}) +@deftypefnx {} {@var{A} =} cellfun (@dots{}, "UniformOutput", @var{val}) -Evaluate the function named @var{name} on the elements of the cell array +Evaluate the function named "@var{fcn}" on the elements of the cell array @var{C}. Elements in @var{C} are passed on to the named function individually. The -function @var{name} can be one of the functions +function @var{fcn} can be one of the functions @table @code @item isempty @@ -316,11 +317,10 @@ Return 1 for elements of @var{class}. @end table -Additionally, @code{cellfun} accepts an arbitrary function @var{func} -in the form of an inline function, function handle, or the name of a -function (in a character string). The function can take one or more -arguments, with the inputs arguments given by @var{C}, @var{D}, etc. -Equally the function can return one or more output arguments. For example: +Additionally, @code{cellfun} accepts an arbitrary function @var{fcn} in the +form of an inline function, function handle, or the name of a function (in a +character string). The function can take one or more arguments, with the +inputs arguments given by @var{C1}, @var{C2}, etc. For example: @example @group @@ -329,9 +329,10 @@ @end group @end example -The number of output arguments of @code{cellfun} matches the number of -output arguments of the function. The outputs of the function will be -collected into the output arguments of @code{cellfun} like this: +The number of output arguments of @code{cellfun} matches the number of output +arguments of the function and can be greater than one. When there are multiple +outputs of the function they will be collected into the output arguments of +@code{cellfun} like this: @example @group @@ -348,14 +349,14 @@ @end group @end example -Note that per default the output argument(s) are arrays of the same size as +Note that, per default, the output argument(s) are arrays of the same size as the input arguments. Input arguments that are singleton (1x1) cells will be automatically expanded to the size of the other arguments. -If the parameter @qcode{"UniformOutput"} is set to true (the default), -then the function must return scalars which will be concatenated into the -return array(s). If @qcode{"UniformOutput"} is false, the outputs are -concatenated into a cell array (or cell arrays). For example: +If the parameter @qcode{"UniformOutput"} is set to true (the default), then the +function must return scalars which will be concatenated into the return +array(s). If @qcode{"UniformOutput"} is false, the outputs are concatenated +into a cell array (or cell arrays). For example: @example @group @@ -366,7 +367,7 @@ @end example Given the parameter @qcode{"ErrorHandler"}, then @var{errfunc} defines a -function to call in case @var{func} generates an error. The form of the +function to call in case @var{fcn} generates an error. The form of the function is @example @@ -375,7 +376,7 @@ @noindent where there is an additional input argument to @var{errfunc} relative to -@var{func}, given by @var{s}. This is a structure with the elements +@var{fcn}, given by @var{s}. This is a structure with the elements @qcode{"identifier"}, @qcode{"message"}, and @qcode{"index"} giving respectively the error identifier, the error message, and the index into the input arguments of the element that caused the error. For example: @@ -388,18 +389,18 @@ @end group @end example -Use @code{cellfun} intelligently. The @code{cellfun} function is a -useful tool for avoiding loops. It is often used with anonymous -function handles; however, calling an anonymous function involves an -overhead quite comparable to the overhead of an m-file function. -Passing a handle to a built-in function is faster, because the -interpreter is not involved in the internal loop. For example: +Use @code{cellfun} intelligently. The @code{cellfun} function is a useful tool +for avoiding loops. It is often used with anonymous function handles; however, +calling an anonymous function involves an overhead quite comparable to the +overhead of an m-file function. Passing a handle to a built-in function is +faster, because the interpreter is not involved in the internal loop. For +example: @example @group -a = @{@dots{}@} -v = cellfun (@@(x) det (x), a); # compute determinants -v = cellfun (@@det, a); # faster +C = @{@dots{}@} +v = cellfun (@@(x) det (x), C); # compute determinants +v = cellfun (@@det, C); # 40% faster @end group @end example @@ -1055,31 +1056,38 @@ DEFMETHOD (arrayfun, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} arrayfun (@var{func}, @var{A}) -@deftypefnx {} {@var{x} =} arrayfun (@var{func}, @var{A}) -@deftypefnx {} {@var{x} =} arrayfun (@var{func}, @var{A}, @var{b}, @dots{}) -@deftypefnx {} {[@var{x}, @var{y}, @dots{}] =} arrayfun (@var{func}, @var{A}, @dots{}) -@deftypefnx {} {} arrayfun (@dots{}, "UniformOutput", @var{val}) -@deftypefnx {} {} arrayfun (@dots{}, "ErrorHandler", @var{errfunc}) +@deftypefn {} {@var{B} =} arrayfun (@var{fcn}, @var{A}) +@deftypefnx {} {@var{B} =} arrayfun (@var{fcn}, @var{A1}, @var{A2}, @dots{}) +@deftypefnx {} {[@var{B1}, @var{B2}, @dots{}] =} arrayfun (@var{fcn}, @var{A}, @dots{}) +@deftypefnx {} {@var{B} =} arrayfun (@dots{}, "UniformOutput", @var{val}) +@deftypefnx {} {@var{B} =} arrayfun (@dots{}, "ErrorHandler", @var{errfunc}) Execute a function on each element of an array. This is useful for functions that do not accept array arguments. If the -function does accept array arguments it is better to call the function +function does accept array arguments it is @emph{better} to call the function directly. -The first input argument @var{func} can be a string, a function -handle, an inline function, or an anonymous function. The input -argument @var{A} can be a logic array, a numeric array, a string -array, a structure array, or a cell array. By a call of the function -@code{arrayfun} all elements of @var{A} are passed on to the named -function @var{func} individually. +The first input argument @var{fcn} can be a string, a function handle, an +inline function, or an anonymous function. The input argument @var{A} can be a +logical array, a numeric array, a string array, a structure array, or a cell +array. @code{arrayfun} passes all elements of @var{A} individually to the +function @var{fcn} and collects the results. The equivalent pseudo-code is -The named function can also take more than two input arguments, with -the input arguments given as third input argument @var{b}, fourth -input argument @var{c}, @dots{} If given more than one array input -argument then all input arguments must have the same sizes, for -example: +@example +@group +cls = class (@var{fcn} (@var{A}(1)); +@var{B} = zeros (size (@var{A}), cls); +for i = 1:numel (@var{A}) + @var{B}(i) = @var{fcn} (@var{A}(i)) +endfor +@end group +@end example + +The named function can also take more than two input arguments, with the input +arguments given as third input argument @var{A2}, fourth input argument +@var{A2}, @dots{} If given more than one array input argument then all input +arguments must have the same sizes. For example: @example @group @@ -1090,10 +1098,10 @@ If the parameter @var{val} after a further string input argument @qcode{"UniformOutput"} is set @code{true} (the default), then the named -function @var{func} must return a single element which then will be -concatenated into the return value and is of type matrix. Otherwise, -if that parameter is set to @code{false}, then the outputs are -concatenated in a cell array. For example: +function @var{fcn} must return a single element which then will be concatenated +into the return value and is of type matrix. Otherwise, if that parameter is +set to @code{false}, then the outputs are concatenated in a cell array. For +example: @example @group @@ -1107,9 +1115,8 @@ @end group @end example -If more than one output arguments are given then the named function -must return the number of return values that also are expected, for -example: +If more than one output arguments are given then the named function must return +the number of return values that also are expected, for example: @example @group @@ -1135,23 +1142,22 @@ If the parameter @var{errfunc} after a further string input argument @qcode{"ErrorHandler"} is another string, a function handle, an inline -function, or an anonymous function, then @var{errfunc} defines a -function to call in the case that @var{func} generates an error. -The definition of the function must be of the form +function, or an anonymous function, then @var{errfunc} defines a function to +call in the case that @var{fcn} generates an error. The definition of the +function must be of the form @example function [@dots{}] = errfunc (@var{s}, @dots{}) @end example @noindent -where there is an additional input argument to @var{errfunc} -relative to @var{func}, given by @var{s}. This is a structure with -the elements @qcode{"identifier"}, @qcode{"message"}, and -@qcode{"index"} giving, respectively, the error identifier, the error -message, and the index of the array elements that caused the error. The -size of the output argument of @var{errfunc} must have the same size as the -output argument of @var{func}, otherwise a real error is thrown. For -example: +where there is an additional input argument to @var{errfunc} relative to +@var{fcn}, given by @var{s}. This is a structure with the elements +@qcode{"identifier"}, @qcode{"message"}, and @qcode{"index"} giving, +respectively, the error identifier, the error message, and the index of the +array elements that caused the error. The size of the output argument of +@var{errfunc} must have the same size as the output argument of @var{fcn}, +otherwise a real error is thrown. For example: @example @group diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/chol.cc --- a/libinterp/corefcn/chol.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/chol.cc Mon Apr 04 10:31:48 2022 -0700 @@ -360,7 +360,7 @@ DEFUN (cholinv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cholinv (@var{A}) +@deftypefn {} {@var{Ainv} =} cholinv (@var{A}) Compute the inverse of the symmetric positive definite matrix @var{A} using the Cholesky@tie{}factorization. @seealso{chol, chol2inv, inv} @@ -484,13 +484,13 @@ DEFUN (chol2inv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} chol2inv (@var{U}) +@deftypefn {} {@var{Ainv} =} chol2inv (@var{R}) Invert a symmetric, positive definite square matrix from its Cholesky -decomposition, @var{U}. +decomposition, @var{R}. -Note that @var{U} should be an upper-triangular matrix with positive -diagonal elements. @code{chol2inv (@var{U})} provides -@code{inv (@var{U}'*@var{U})} but it is much faster than using @code{inv}. +Note that @var{R} should be an upper-triangular matrix with positive diagonal +elements. @code{chol2inv (@var{U})} provides @code{inv (@var{R}'*@var{R})} but +is much faster than using @code{inv}. @seealso{chol, cholinv, inv} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/conv2.cc --- a/libinterp/corefcn/conv2.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/conv2.cc Mon Apr 04 10:31:48 2022 -0700 @@ -40,9 +40,9 @@ DEFUN (conv2, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} conv2 (@var{A}, @var{B}) -@deftypefnx {} {} conv2 (@var{v1}, @var{v2}, @var{m}) -@deftypefnx {} {} conv2 (@dots{}, @var{shape}) +@deftypefn {} {@var{C} =} conv2 (@var{A}, @var{B}) +@deftypefnx {} {@var{C} =} conv2 (@var{v1}, @var{v2}, @var{m}) +@deftypefnx {} {@var{C} =} conv2 (@dots{}, @var{shape}) Return the 2-D convolution of @var{A} and @var{B}. The size of the result is determined by the optional @var{shape} argument diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/data.cc Mon Apr 04 10:31:48 2022 -0700 @@ -70,14 +70,14 @@ DEFUN (all, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} all (@var{x}) -@deftypefnx {} {} all (@var{x}, @var{dim}) +@deftypefn {} {@var{tf} =} all (@var{x}) +@deftypefnx {} {@var{tf} =} all (@var{x}, @var{dim}) For a vector argument, return true (logical 1) if all elements of the vector are nonzero. -For a matrix argument, return a row vector of logical ones and -zeros with each element indicating whether all of the elements of the -corresponding column of the matrix are nonzero. For example: +For a matrix argument, return a row vector of logical ones and zeros with each +element indicating whether all of the elements of the corresponding column of +the matrix are nonzero. For example: @example @group @@ -86,8 +86,7 @@ @end group @end example -If the optional argument @var{dim} is supplied, work along dimension -@var{dim}. +If the optional argument @var{dim} is supplied, work along dimension @var{dim}. @seealso{any} @end deftypefn */) { @@ -128,14 +127,14 @@ DEFUN (any, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} any (@var{x}) -@deftypefnx {} {} any (@var{x}, @var{dim}) +@deftypefn {} {@var{tf} =} any (@var{x}) +@deftypefnx {} {@var{tf} =} any (@var{x}, @var{dim}) For a vector argument, return true (logical 1) if any element of the vector is nonzero. -For a matrix argument, return a row vector of logical ones and -zeros with each element indicating whether any of the elements of the -corresponding column of the matrix are nonzero. For example: +For a matrix argument, return a row vector of logical ones and zeros with each +element indicating whether any of the elements of the corresponding column of +the matrix are nonzero. For example: @example @group @@ -144,8 +143,8 @@ @end group @end example -If the optional argument @var{dim} is supplied, work along dimension -@var{dim}. For example: +If the optional argument @var{dim} is supplied, work along dimension @var{dim}. +For example: @example @group @@ -195,13 +194,13 @@ DEFUN (atan2, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} atan2 (@var{y}, @var{x}) -Compute atan (@var{y} / @var{x}) for corresponding elements of @var{y} -and @var{x}. - -@var{y} and @var{x} must match in size and orientation. The signs of -elements of @var{y} and @var{x} are used to determine the quadrants of each -resulting value. +@deftypefn {} {@var{angle} =} atan2 (@var{y}, @var{x}) +Compute atan (@var{y} / @var{x}) for corresponding elements of @var{y} and +@var{x}. + +@var{y} and @var{x} must match in size and orientation. The signs of elements +of @var{y} and @var{x} are used to determine the quadrants of each resulting +value. This function is equivalent to @code{arg (complex (@var{x}, @var{y}))}. @seealso{tan, tand, tanh, atanh} @@ -365,8 +364,8 @@ DEFUN (hypot, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} hypot (@var{x}, @var{y}) -@deftypefnx {} {} hypot (@var{x}, @var{y}, @var{z}, @dots{}) +@deftypefn {} {@var{h} =} hypot (@var{x}, @var{y}) +@deftypefnx {} {@var{h} =} hypot (@var{x}, @var{y}, @var{z}, @dots{}) Compute the element-by-element square root of the sum of the squares of @var{x} and @var{y}. @@ -571,7 +570,7 @@ DEFUN (rem, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} rem (@var{x}, @var{y}) +@deftypefn {} {@var{r} =} rem (@var{x}, @var{y}) Return the remainder of the division @code{@var{x} / @var{y}}. The remainder is computed using the expression @@ -752,7 +751,7 @@ DEFUN (mod, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} mod (@var{x}, @var{y}) +@deftypefn {} {@var{m} =} mod (@var{x}, @var{y}) Compute the modulo of @var{x} and @var{y}. Conceptually this is given by @@ -997,8 +996,8 @@ DEFUN (cumprod, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cumprod (@var{x}) -@deftypefnx {} {} cumprod (@var{x}, @var{dim}) +@deftypefn {} {@var{y} =} cumprod (@var{x}) +@deftypefnx {} {@var{y} =} cumprod (@var{x}, @var{dim}) Cumulative product of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to the first non-singleton dimension. @@ -1043,10 +1042,10 @@ DEFUN (cumsum, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cumsum (@var{x}) -@deftypefnx {} {} cumsum (@var{x}, @var{dim}) -@deftypefnx {} {} cumsum (@dots{}, "native") -@deftypefnx {} {} cumsum (@dots{}, "double") +@deftypefn {} {@var{y} =} cumsum (@var{x}) +@deftypefnx {} {@var{y} =} cumsum (@var{x}, @var{dim}) +@deftypefnx {} {@var{y} =} cumsum (@dots{}, "native") +@deftypefnx {} {@var{y} =} cumsum (@dots{}, "double") Cumulative sum of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to the first non-singleton dimension. @@ -1347,10 +1346,10 @@ DEFUN (prod, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} prod (@var{x}) -@deftypefnx {} {} prod (@var{x}, @var{dim}) -@deftypefnx {} {} prod (@dots{}, "native") -@deftypefnx {} {} prod (@dots{}, "double") +@deftypefn {} {@var{y} =} prod (@var{x}) +@deftypefnx {} {@var{y} =} prod (@var{x}, @var{dim}) +@deftypefnx {} {@var{y} =} prod (@dots{}, "native") +@deftypefnx {} {@var{y} =} prod (@dots{}, "double") Product of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to the first non-singleton dimension. @@ -2026,7 +2025,7 @@ DEFUN (horzcat, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} horzcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN}) +@deftypefn {} {@var{A} =} horzcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN}) Return the horizontal concatenation of N-D array objects, @var{array1}, @var{array2}, @dots{}, @var{arrayN} along dimension 2. @@ -2034,8 +2033,11 @@ new matrices. For example: @example -@var{hcat} = [ @var{array1}, @var{array2}, @dots{} ] +@var{A} = [ @var{array1}, @var{array2}, @dots{} ] @end example + +This syntax is slightly more efficient because the Octave parser can +concatenate the arrays without the overhead of a function call. @seealso{cat, vertcat} @end deftypefn */) { @@ -2265,7 +2267,7 @@ DEFUN (vertcat, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} vertcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN}) +@deftypefn {} {@var{A} =} vertcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN}) Return the vertical concatenation of N-D array objects, @var{array1}, @var{array2}, @dots{}, @var{arrayN} along dimension 1. @@ -2273,8 +2275,11 @@ new matrices. For example: @example -@var{vcat} = [ @var{array1}; @var{array2}; @dots{} ] +@var{A} = [ @var{array1}; @var{array2}; @dots{} ] @end example + +This syntax is slightly more efficient because the Octave parser can +concatenate the arrays without the overhead of a function call. @seealso{cat, horzcat} @end deftypefn */) { @@ -2290,9 +2295,9 @@ DEFUN (cat, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cat (@var{dim}, @var{array1}, @var{array2}, @dots{}, @var{arrayN}) -Return the concatenation of N-D array objects, @var{array1}, -@var{array2}, @dots{}, @var{arrayN} along dimension @var{dim}. +@deftypefn {} {@var{A} =} cat (@var{dim}, @var{array1}, @var{array2}, @dots{}, @var{arrayN}) +Return the concatenation of N-D array objects, @var{array1}, @var{array2}, +@dots{}, @var{arrayN} along dimension @var{dim}. @example @group @@ -2304,8 +2309,8 @@ @end group @end example -Alternatively, we can concatenate @var{A} and @var{B} along the -second dimension in the following way: +Alternatively, we can concatenate @var{A} and @var{B} along the second +dimension in the following way: @example @group @@ -2313,9 +2318,8 @@ @end group @end example -@var{dim} can be larger than the dimensions of the N-D array objects -and the result will thus have @var{dim} dimensions as the -following example shows: +@var{dim} can be larger than the dimensions of the N-D array objects and the +result will thus have @var{dim} dimensions as the following example shows: @example @group @@ -2525,7 +2529,7 @@ DEFUN (permute, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} permute (@var{A}, @var{perm}) +@deftypefn {} {@var{B} =} permute (@var{A}, @var{perm}) Return the generalized transpose for an N-D array object @var{A}. The permutation vector @var{perm} must contain the elements @@ -2558,7 +2562,7 @@ DEFUN (ipermute, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ipermute (@var{A}, @var{iperm}) +@deftypefn {} {@var{A} =} ipermute (@var{B}, @var{iperm}) The inverse of the @code{permute} function. The expression @@ -2577,13 +2581,13 @@ DEFUN (length, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} length (@var{a}) -Return the length of the object @var{a}. +@deftypefn {} {@var{n} =} length (@var{A}) +Return the length of the object @var{A}. The length is 0 for empty objects, 1 for scalars, and the number of elements for vectors. For matrix or N-dimensional objects, the length is the number of elements along the largest dimension -(equivalent to @w{@code{max (size (@var{a}))}}). +(equivalent to @w{@code{max (size (@var{A}))}}). @seealso{numel, size} @end deftypefn */) { @@ -2595,12 +2599,12 @@ DEFUN (ndims, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ndims (@var{a}) -Return the number of dimensions of @var{a}. +@deftypefn {} {@var{n} =} ndims (@var{A}) +Return the number of dimensions of @var{A}. For any array, the result will always be greater than or equal to 2. -Trailing singleton dimensions are not counted, i.e., tailing dimensions @var{d} -greater than 2, for which @code{size (@var{a}, @var{d}) = 1}. +Trailing singleton dimensions are not counted, i.e., trailing dimensions @var{d} +greater than 2 for which @code{size (@var{A}, @var{d}) = 1}. @example @group @@ -2635,15 +2639,15 @@ DEFUN (numel, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} numel (@var{a}) -@deftypefnx {} {} numel (@var{a}, @var{idx1}, @var{idx2}, @dots{}) -Return the number of elements in the object @var{a}. +@deftypefn {} {@var{n} =} numel (@var{A}) +@deftypefnx {} {@var{n} =} numel (@var{A}, @var{idx1}, @var{idx2}, @dots{}) +Return the number of elements in the object @var{A}. Optionally, if indices @var{idx1}, @var{idx2}, @dots{} are supplied, return the number of elements that would result from the indexing @example -@var{a}(@var{idx1}, @var{idx2}, @dots{}) +@var{A}(@var{idx1}, @var{idx2}, @dots{}) @end example Note that the indices do not have to be scalar numbers. For example, @@ -2663,8 +2667,8 @@ @example @group -@var{a} = ones (5, 3); -numel (@var{a}, 2, ":") +@var{A} = ones (5, 3); +numel (@var{A}, 2, ":") @end group @end example @@ -2697,12 +2701,12 @@ DEFUN (size, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {@var{sz} =} size (@var{a}) -@deftypefnx {} {@var{dim_sz} =} size (@var{a}, @var{dim}) -@deftypefnx {} {@var{dim_sz} =} size (@var{a}, @var{d1}, @var{d2}, @dots{}) +@deftypefn {} {@var{sz} =} size (@var{A}) +@deftypefnx {} {@var{dim_sz} =} size (@var{A}, @var{dim}) +@deftypefnx {} {@var{dim_sz} =} size (@var{A}, @var{d1}, @var{d2}, @dots{}) @deftypefnx {} {[@var{rows}, @var{cols}, @dots{}, @var{dim_N_sz}] =} size (@dots{}) Return a row vector with the size (number of elements) of each dimension for -the object @var{a}. +the object @var{A}. When given a second argument, @var{dim}, return the size of the corresponding dimension. If @var{dim} is a vector, return each of the corresponding @@ -2712,7 +2716,7 @@ with multiple output arguments, @code{size} returns the size of dimension N in the Nth argument. The number of rows, dimension 1, is returned in the first argument, the number of columns, dimension 2, is returned in the -second argument, etc. If there are more dimensions in @var{a} than there are +second argument, etc. If there are more dimensions in @var{A} than there are output arguments, @code{size} returns the total number of elements in the remaining dimensions in the final output argument. @@ -2906,7 +2910,8 @@ DEFUN (size_equal, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} size_equal (@var{a}, @var{b}, @dots{}) +@deftypefn {} {@var{TF} =} size_equal (@var{A}, @var{B}) +@deftypefnx {} {@var{TF} =} size_equal (@var{A}, @var{B}, @dots{}) Return true if the dimensions of all arguments agree. Trailing singleton dimensions are ignored. When called with a single argument, @@ -2934,8 +2939,8 @@ DEFUN (nnz, args, , doc: /* -*- texinfo -*- -@deftypefn {} {@var{n} =} nnz (@var{a}) -Return the number of nonzero elements in @var{a}. +@deftypefn {} {@var{n} =} nnz (@var{A}) +Return the number of nonzero elements in @var{A}. @seealso{nzmax, nonzeros, find} @end deftypefn */) { @@ -2983,9 +2988,10 @@ DEFUN (rows, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} rows (@var{a}) -Return the number of rows of @var{a}. This is equivalent to -@code{size (@var{a}, 1)}. +@deftypefn {} {@var{nr} =} rows (@var{A}) +Return the number of rows of @var{A}. + +This is equivalent to @code{size (@var{A}, 1)}. @seealso{columns, size, length, numel, isscalar, isvector, ismatrix} @end deftypefn */) { @@ -3027,9 +3033,10 @@ DEFUN (columns, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} columns (@var{a}) -Return the number of columns of @var{a}. This is equivalent to -@code{size (@var{a}, 2)}. +@deftypefn {} {@var{nc} =} columns (@var{A}) +Return the number of columns of @var{A}. + +This is equivalent to @code{size (@var{A}, 2)}. @seealso{rows, size, length, numel, isscalar, isvector, ismatrix} @end deftypefn */) { @@ -3044,11 +3051,11 @@ DEFUN (sum, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sum (@var{x}) -@deftypefnx {} {} sum (@var{x}, @var{dim}) -@deftypefnx {} {} sum (@dots{}, "native") -@deftypefnx {} {} sum (@dots{}, "double") -@deftypefnx {} {} sum (@dots{}, "extra") +@deftypefn {} {@var{y} =} sum (@var{x}) +@deftypefnx {} {@var{y} =} sum (@var{x}, @var{dim}) +@deftypefnx {} {@var{y} =} sum (@dots{}, "native") +@deftypefnx {} {@var{y} =} sum (@dots{}, "double") +@deftypefnx {} {@var{y} =} sum (@dots{}, "extra") Sum of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to the first non-singleton dimension. @@ -3275,8 +3282,8 @@ DEFUN (sumsq, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sumsq (@var{x}) -@deftypefnx {} {} sumsq (@var{x}, @var{dim}) +@deftypefn {} {@var{y} =} sumsq (@var{x}) +@deftypefnx {} {@var{y} =} sumsq (@var{x}, @var{dim}) Sum of squares of elements along dimension @var{dim}. If @var{dim} is omitted, it defaults to the first non-singleton dimension. @@ -3451,8 +3458,8 @@ DEFUN (complex, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} complex (@var{x}) -@deftypefnx {} {} complex (@var{re}, @var{im}) +@deftypefn {} {@var{z} =} complex (@var{x}) +@deftypefnx {} {@var{z} =} complex (@var{re}, @var{im}) Return a complex value from real arguments. With 1 real argument @var{x}, return the complex result @@ -3778,8 +3785,8 @@ DEFUN (isempty, args, , doc: /* -*- texinfo -*- -@deftypefn {} {@var{tf} =} isempty (@var{a}) -Return true if @var{a} is an empty matrix (any one of its dimensions is +@deftypefn {} {@var{tf} =} isempty (@var{A}) +Return true if @var{A} is an empty matrix (any one of its dimensions is zero). @seealso{isnull, isa} @end deftypefn */) @@ -4699,11 +4706,11 @@ @c List other form of function in documentation index @findex inf -@deftypefn {} {} Inf -@deftypefnx {} {} Inf (@var{n}) -@deftypefnx {} {} Inf (@var{n}, @var{m}) -@deftypefnx {} {} Inf (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} Inf (@dots{}, @var{class}) +@deftypefn {} {@var{A} =} Inf +@deftypefnx {} {@var{A} =} Inf (@var{n}) +@deftypefnx {} {@var{A} =} Inf (@var{n}, @var{m}) +@deftypefnx {} {@var{A} =} Inf (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{A} =} Inf (@dots{}, @var{class}) Return a scalar, matrix or N-dimensional array whose elements are all equal to the IEEE representation for positive infinity. @@ -4850,11 +4857,11 @@ DEFUN (e, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} e -@deftypefnx {} {} e (@var{n}) -@deftypefnx {} {} e (@var{n}, @var{m}) -@deftypefnx {} {} e (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} e (@dots{}, @var{class}) +@deftypefn {} {@var{A} =} e +@deftypefnx {} {@var{A} =} e (@var{n}) +@deftypefnx {} {@var{A} =} e (@var{n}, @var{m}) +@deftypefnx {} {@var{A} =} e (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{A} =} e (@dots{}, @var{class}) Return a scalar, matrix, or N-dimensional array whose elements are all equal to the base of natural logarithms. @@ -4868,15 +4875,15 @@ When called with no arguments, return a scalar with the value @math{e}. -When called with a single argument, return a square matrix with the -dimension specified. +When called with a single argument, return a square matrix with the dimension +specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. -The optional argument @var{class} specifies the return type and may be -either @qcode{"double"} or @qcode{"single"}. +The optional argument @var{class} specifies the return type and may be either +@qcode{"double"} or @qcode{"single"}. @seealso{log, exp, pi, I} @end deftypefn */) { @@ -4916,11 +4923,11 @@ DEFUN (eps, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} eps -@deftypefnx {} {} eps (@var{x}) -@deftypefnx {} {} eps (@var{n}, @var{m}) -@deftypefnx {} {} eps (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} eps (@dots{}, @var{class}) +@deftypefn {} {@var{d} =} eps +@deftypefnx {} {@var{d} =} eps (@var{x}) +@deftypefnx {} {@var{d} =} eps (@var{n}, @var{m}) +@deftypefnx {} {@var{d} =} eps (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{d} =} eps (@dots{}, @var{class}) Return a scalar, matrix or N-dimensional array whose elements are all eps, the machine precision. @@ -5002,11 +5009,11 @@ DEFUN (pi, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} pi -@deftypefnx {} {} pi (@var{n}) -@deftypefnx {} {} pi (@var{n}, @var{m}) -@deftypefnx {} {} pi (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} pi (@dots{}, @var{class}) +@deftypefn {} {@var{p} =} pi +@deftypefnx {} {@var{p} =} pi (@var{n}) +@deftypefnx {} {@var{p} =} pi (@var{n}, @var{m}) +@deftypefnx {} {@var{p} =} pi (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{p} =} pi (@dots{}, @var{class}) Return a scalar, matrix, or N-dimensional array whose elements are all equal to the ratio of the circumference of a circle to its @tex @@ -5016,8 +5023,6 @@ diameter. @end ifnottex -Internally, @code{pi} is computed as @samp{4.0 * atan (1.0)}. - When called with no arguments, return a scalar with the value of @tex $\pi$. @@ -5026,15 +5031,15 @@ pi. @end ifnottex -When called with a single argument, return a square matrix with the -dimension specified. +When called with a single argument, return a square matrix with the dimension +specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. -The optional argument @var{class} specifies the return type and may be -either @qcode{"double"} or @qcode{"single"}. +The optional argument @var{class} specifies the return type and may be either +@qcode{"double"} or @qcode{"single"}. @seealso{e, I} @end deftypefn */) { @@ -5049,11 +5054,11 @@ DEFUN (realmax, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} realmax -@deftypefnx {} {} realmax (@var{n}) -@deftypefnx {} {} realmax (@var{n}, @var{m}) -@deftypefnx {} {} realmax (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} realmax (@dots{}, @var{class}) +@deftypefn {} {@var{Rmax} =} realmax +@deftypefnx {} {@var{Rmax} =} realmax (@var{n}) +@deftypefnx {} {@var{Rmax} =} realmax (@var{n}, @var{m}) +@deftypefnx {} {@var{Rmax} =} realmax (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{Rmax} =} realmax (@dots{}, @var{class}) Return a scalar, matrix, or N-dimensional array whose elements are all equal to the largest floating point number that is representable. @@ -5088,16 +5093,16 @@ DEFUN (realmin, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} realmin -@deftypefnx {} {} realmin (@var{n}) -@deftypefnx {} {} realmin (@var{n}, @var{m}) -@deftypefnx {} {} realmin (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} realmin (@dots{}, @var{class}) +@deftypefn {} {@var{Rmin} =} realmin +@deftypefnx {} {@var{Rmin} =} realmin (@var{n}) +@deftypefnx {} {@var{Rmin} =} realmin (@var{n}, @var{m}) +@deftypefnx {} {@var{Rmin} =} realmin (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{Rmin} =} realmin (@dots{}, @var{class}) Return a scalar, matrix, or N-dimensional array whose elements are all equal to the smallest normalized floating point number that is representable. -The actual value is system dependent. On machines that support -IEEE floating point arithmetic, @code{realmin} is approximately +The actual value is system dependent. On machines that support IEEE floating +point arithmetic, @code{realmin} is approximately @tex $2.2251\times10^{-308}$ for double precision and $1.1755\times10^{-38}$ @end tex @@ -5109,15 +5114,15 @@ When called with no arguments, return a scalar with the value @code{realmin (@qcode{"double"})}. -When called with a single argument, return a square matrix with the -dimension specified. +When called with a single argument, return a square matrix with the dimension +specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. -The optional argument @var{class} specifies the return type and may be -either @qcode{"double"} or @qcode{"single"}. +The optional argument @var{class} specifies the return type and may be either +@qcode{"double"} or @qcode{"single"}. @seealso{realmax, intmin, eps} @end deftypefn */) { @@ -5132,11 +5137,11 @@ @findex j @findex J -@deftypefn {} {} I -@deftypefnx {} {} I (@var{n}) -@deftypefnx {} {} I (@var{n}, @var{m}) -@deftypefnx {} {} I (@var{n}, @var{m}, @var{k}, @dots{}) -@deftypefnx {} {} I (@dots{}, @var{class}) +@deftypefn {} {@var{A} =} I +@deftypefnx {} {@var{A} =} I (@var{n}) +@deftypefnx {} {@var{A} =} I (@var{n}, @var{m}) +@deftypefnx {} {@var{A} =} I (@var{n}, @var{m}, @var{k}, @dots{}) +@deftypefnx {} {@var{A} =} I (@dots{}, @var{class}) Return a scalar, matrix, or N-dimensional array whose elements are all equal to the pure imaginary unit, defined as @tex @@ -5387,10 +5392,10 @@ DEFUN (eye, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} eye (@var{n}) -@deftypefnx {} {} eye (@var{m}, @var{n}) -@deftypefnx {} {} eye ([@var{m} @var{n}]) -@deftypefnx {} {} eye (@dots{}, @var{class}) +@deftypefn {} {@var{I} =} eye (@var{n}) +@deftypefnx {} {@var{I} =} eye (@var{m}, @var{n}) +@deftypefnx {} {@var{I} =} eye ([@var{m} @var{n}]) +@deftypefnx {} {@var{I} =} eye (@dots{}, @var{class}) Return an identity matrix. If invoked with a single scalar argument @var{n}, return a square @@ -5537,8 +5542,8 @@ DEFUN (linspace, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} linspace (@var{start}, @var{end}) -@deftypefnx {} {} linspace (@var{start}, @var{end}, @var{n}) +@deftypefn {} {@var{y} =} linspace (@var{start}, @var{end}) +@deftypefnx {} {@var{y} =} linspace (@var{start}, @var{end}, @var{n}) Return a row vector with @var{n} linearly spaced elements between @var{start} and @var{end}. @@ -5714,19 +5719,19 @@ DEFUN (resize, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} resize (@var{x}, @var{m}) -@deftypefnx {} {} resize (@var{x}, @var{m}, @var{n}, @dots{}) -@deftypefnx {} {} resize (@var{x}, [@var{m} @var{n} @dots{}]) -Resize @var{x} cutting off elements as necessary. +@deftypefn {} {@var{B} =} resize (@var{A}, @var{m}) +@deftypefnx {} {@var{B} =} resize (@var{A}, @var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{B} =} resize (@var{A}, [@var{m} @var{n} @dots{}]) +Resize @var{A} cutting off elements as necessary. In the result, element with certain indices is equal to the corresponding -element of @var{x} if the indices are within the bounds of @var{x}; -otherwise, the element is set to zero. +element of @var{A} if the indices are within the bounds of @var{A}; otherwise, +the element is set to zero. In other words, the statement @example -y = resize (x, dv) +B = resize (A, dv) @end example @noindent @@ -5734,28 +5739,27 @@ @example @group -y = zeros (dv, class (x)); -sz = min (dv, size (x)); +B = zeros (dv, class (A)); +sz = min (dv, size (A)); for i = 1:length (sz) idx@{i@} = 1:sz(i); endfor -y(idx@{:@}) = x(idx@{:@}); +B(idx@{:@}) = A(idx@{:@}); @end group @end example @noindent but is performed more efficiently. -If only @var{m} is supplied, and it is a scalar, the dimension of the -result is @var{m}-by-@var{m}. -If @var{m}, @var{n}, @dots{} are all scalars, then the dimensions of -the result are @var{m}-by-@var{n}-by-@dots{}. -If given a vector as input, then the -dimensions of the result are given by the elements of that vector. - -An object can be resized to more dimensions than it has; -in such case the missing dimensions are assumed to be 1. -Resizing an object to fewer dimensions is not possible. +If only @var{m} is supplied, and it is a scalar, the dimension of the result is +@var{m}-by-@var{m}. If @var{m}, @var{n}, @dots{} are all scalars, then the +dimensions of the result are @var{m}-by-@var{n}-by-@dots{}. If given a vector +as input, then the dimensions of the result are given by the elements of that +vector. + +An object can be resized to more dimensions than it has; in such case the +missing dimensions are assumed to be 1. Resizing an object to fewer dimensions +is not possible. @seealso{reshape, postpad, prepad, cat} @end deftypefn */) { @@ -5804,10 +5808,10 @@ DEFUN (reshape, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} reshape (@var{A}, @var{m}, @var{n}, @dots{}) -@deftypefnx {} {} reshape (@var{A}, [@var{m} @var{n} @dots{}]) -@deftypefnx {} {} reshape (@var{A}, @dots{}, [], @dots{}) -@deftypefnx {} {} reshape (@var{A}, @var{size}) +@deftypefn {} {@var{B} =} reshape (@var{A}, @var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{B} =} reshape (@var{A}, [@var{m} @var{n} @dots{}]) +@deftypefnx {} {@var{B} =} reshape (@var{A}, @dots{}, [], @dots{}) +@deftypefnx {} {@var{B} =} reshape (@var{A}, @var{size}) Return a matrix with the specified dimensions (@var{m}, @var{n}, @dots{}) whose elements are taken from the matrix @var{A}. @@ -6002,8 +6006,8 @@ DEFUN (squeeze, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} squeeze (@var{x}) -Remove singleton dimensions from @var{x} and return the result. +@deftypefn {} {@var{B} =} squeeze (@var{A}) +Remove singleton dimensions from @var{A} and return the result. Note that for compatibility with @sc{matlab}, all objects have a minimum of two dimensions and row vectors are left unchanged. @@ -6020,7 +6024,7 @@ doc: /* -*- texinfo -*- @deftypefn {} {@var{FM} =} full (@var{SM}) Return a full storage matrix from a sparse, diagonal, or permutation matrix, -or a range. +or from a range. @seealso{sparse, issparse} @end deftypefn */) { @@ -6034,9 +6038,9 @@ DEFUN (norm, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} norm (@var{A}) -@deftypefnx {} {} norm (@var{A}, @var{p}) -@deftypefnx {} {} norm (@var{A}, @var{p}, @var{opt}) +@deftypefn {} {@var{n} =} norm (@var{A}) +@deftypefnx {} {@var{n} =} norm (@var{A}, @var{p}) +@deftypefnx {} {@var{n} =} norm (@var{A}, @var{p}, @var{opt}) Compute the p-norm of the matrix @var{A}. If the second argument is not given, @w{@code{p = 2}} is used. @@ -6296,8 +6300,8 @@ DEFUN (uplus, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} uplus (@var{x}) -This function and @w{@tcode{+ @var{x}}} are equivalent. +@deftypefn {} {@var{B} =} uplus (@var{A}) +This function and @w{@tcode{+ @var{A}}} are equivalent. @seealso{uminus, plus} @end deftypefn */) { @@ -6306,8 +6310,8 @@ DEFUN (uminus, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} uminus (@var{x}) -This function and @w{@tcode{- @var{x}}} are equivalent. +@deftypefn {} {@var{B} =} uminus (@var{A}) +This function and @w{@tcode{- @var{A}}} are equivalent. @seealso{uplus, minus} @end deftypefn */) { @@ -6316,10 +6320,10 @@ DEFUN (transpose, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} transpose (@var{x}) -Return the transpose of @var{x}. - -This function and @tcode{@var{x}.'@:} are equivalent. +@deftypefn {} {@var{B} =} transpose (@var{A}) +Return the transpose of @var{A}. + +This function and @tcode{@var{A}.'@:} are equivalent. @seealso{ctranspose} @end deftypefn */) { @@ -6348,10 +6352,10 @@ DEFUN (ctranspose, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ctranspose (@var{x}) -Return the complex conjugate transpose of @var{x}. - -This function and @tcode{@var{x}'} are equivalent. +@deftypefn {} {@var{B} =} ctranspose (@var{A}) +Return the complex conjugate transpose of @var{A}. + +This function and @tcode{@var{A}'} are equivalent. @seealso{transpose} @end deftypefn */) { @@ -6415,8 +6419,8 @@ DEFUN (plus, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} plus (@var{x}, @var{y}) -@deftypefnx {} {} plus (@var{x1}, @var{x2}, @dots{}) +@deftypefn {} {@var{z} =} plus (@var{x}, @var{y}) +@deftypefnx {} {@var{z} =} plus (@var{x1}, @var{x2}, @dots{}) This function and @w{@tcode{@var{x} + @var{y}}} are equivalent. If more arguments are given, the summation is applied @@ -6446,8 +6450,8 @@ DEFUN (minus, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} minus (@var{x}, @var{y}) -This function and @w{@tcode{@var{x} - @var{y}}} are equivalent. +@deftypefn {} {@var{C} =} minus (@var{A}, @var{B}) +This function and @w{@tcode{@var{A} - @var{B}}} are equivalent. @seealso{plus, uminus} @end deftypefn */) { @@ -6456,16 +6460,16 @@ DEFUN (mtimes, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} mtimes (@var{x}, @var{y}) -@deftypefnx {} {} mtimes (@var{x1}, @var{x2}, @dots{}) +@deftypefn {} {@var{C} =} mtimes (@var{A}, @var{B}) +@deftypefnx {} {@var{C} =} mtimes (@var{A1}, @var{A2}, @dots{}) Return the matrix multiplication product of inputs. -This function and @w{@tcode{@var{x} * @var{y}}} are equivalent. +This function and @w{@tcode{@var{A} * @var{B}}} are equivalent. If more arguments are given, the multiplication is applied cumulatively from left to right: @example -(@dots{}((@var{x1} * @var{x2}) * @var{x3}) * @dots{}) +(@dots{}((@var{A1} * @var{A2}) * @var{A3}) * @dots{}) @end example @seealso{times, plus, minus, rdivide, mrdivide, mldivide, mpower} @@ -6477,10 +6481,10 @@ DEFUN (mrdivide, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} mrdivide (@var{x}, @var{y}) -Return the matrix right division of @var{x} and @var{y}. - -This function and @w{@tcode{@var{x} / @var{y}}} are equivalent. +@deftypefn {} {@var{C} =} mrdivide (@var{A}, @var{B}) +Return the matrix right division of @var{A} and @var{B}. + +This function and @w{@tcode{@var{A} / @var{B}}} are equivalent. If the system is not square, or if the coefficient matrix is singular, a minimum norm solution is computed. @@ -6492,10 +6496,10 @@ DEFUN (mpower, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} mpower (@var{x}, @var{y}) -Return the matrix power operation of @var{x} raised to the @var{y} power. - -This function and @w{@tcode{@var{x} ^ @var{y}}} are equivalent. +@deftypefn {} {@var{C} =} mpower (@var{A}, @var{B}) +Return the matrix power operation of @var{A} raised to the @var{B} power. + +This function and @w{@tcode{@var{A} ^ @var{B}}} are equivalent. @seealso{power, mtimes, plus, minus} @end deftypefn */) { @@ -6504,10 +6508,10 @@ DEFUN (mldivide, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} mldivide (@var{x}, @var{y}) -Return the matrix left division of @var{x} and @var{y}. - -This function and @w{@tcode{@var{x} @backslashchar{} @var{y}}} are equivalent. +@deftypefn {} {@var{C} =} mldivide (@var{A}, @var{B}) +Return the matrix left division of @var{A} and @var{B}. + +This function and @w{@tcode{@var{A} @backslashchar{} @var{B}}} are equivalent. If the system is not square, or if the coefficient matrix is singular, a minimum norm solution is computed. @@ -6519,8 +6523,8 @@ DEFUN (lt, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} lt (@var{x}, @var{y}) -This function is equivalent to @w{@code{@var{x} < @var{y}}}. +@deftypefn {} {@var{TF} =} lt (@var{A}, @var{B}) +This function is equivalent to @w{@code{@var{A} < @var{B}}}. @seealso{le, eq, ge, gt, ne} @end deftypefn */) { @@ -6529,8 +6533,8 @@ DEFUN (le, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} le (@var{x}, @var{y}) -This function is equivalent to @w{@code{@var{x} <= @var{y}}}. +@deftypefn {} {@var{TF} =} le (@var{A}, @var{B}) +This function is equivalent to @w{@code{@var{A} <= @var{B}}}. @seealso{eq, ge, gt, ne, lt} @end deftypefn */) { @@ -6539,10 +6543,10 @@ DEFUN (eq, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} eq (@var{x}, @var{y}) +@deftypefn {} {@var{TF} =} eq (@var{A}, @var{B}) Return true if the two inputs are equal. -This function is equivalent to @w{@code{@var{x} == @var{y}}}. +This function is equivalent to @w{@code{@var{A} == @var{B}}}. @seealso{ne, isequal, le, ge, gt, ne, lt} @end deftypefn */) { @@ -6551,8 +6555,8 @@ DEFUN (ge, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ge (@var{x}, @var{y}) -This function is equivalent to @w{@code{@var{x} >= @var{y}}}. +@deftypefn {} {@var{TF} =} ge (@var{A}, @var{B}) +This function is equivalent to @w{@code{@var{A} >= @var{B}}}. @seealso{le, eq, gt, ne, lt} @end deftypefn */) { @@ -6561,8 +6565,8 @@ DEFUN (gt, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} gt (@var{x}, @var{y}) -This function is equivalent to @w{@code{@var{x} > @var{y}}}. +@deftypefn {} {@var{TF} =} gt (@var{A}, @var{B}) +This function is equivalent to @w{@code{@var{A} > @var{B}}}. @seealso{le, eq, ge, ne, lt} @end deftypefn */) { @@ -6571,10 +6575,10 @@ DEFUN (ne, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ne (@var{x}, @var{y}) +@deftypefn {} {@var{TF} =} ne (@var{A}, @var{B}) Return true if the two inputs are not equal. -This function is equivalent to @w{@code{@var{x} != @var{y}}}. +This function is equivalent to @w{@code{@var{A} != @var{B}}}. @seealso{eq, isequal, le, ge, lt} @end deftypefn */) { @@ -6583,16 +6587,16 @@ DEFUN (times, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} times (@var{x}, @var{y}) -@deftypefnx {} {} times (@var{x1}, @var{x2}, @dots{}) +@deftypefn {} {@var{C} =} times (@var{A}, @var{B}) +@deftypefnx {} {@var{C} =} times (@var{A1}, @var{A2}, @dots{}) Return the element-by-element multiplication product of inputs. -This function and @w{@tcode{@var{x} .* @var{y}}} are equivalent. +This function and @w{@tcode{@var{A} .* @var{B}}} are equivalent. If more arguments are given, the multiplication is applied cumulatively from left to right: @example -(@dots{}((@var{x1} .* @var{x2}) .* @var{x3}) .* @dots{}) +(@dots{}((@var{A1} .* @var{A2}) .* @var{A3}) .* @dots{}) @end example @seealso{mtimes, rdivide} @@ -6604,10 +6608,10 @@ DEFUN (rdivide, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} rdivide (@var{x}, @var{y}) -Return the element-by-element right division of @var{x} and @var{y}. - -This function and @w{@tcode{@var{x} ./ @var{y}}} are equivalent. +@deftypefn {} {@var{C} =} rdivide (@var{A}, @var{B}) +Return the element-by-element right division of @var{A} and @var{B}. + +This function and @w{@tcode{@var{A} ./ @var{B}}} are equivalent. @seealso{ldivide, mrdivide, times, plus} @end deftypefn */) { @@ -6616,11 +6620,11 @@ DEFUN (power, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} power (@var{x}, @var{y}) -Return the element-by-element operation of @var{x} raised to the -@var{y} power. - -This function and @w{@tcode{@var{x} .^ @var{y}}} are equivalent. +@deftypefn {} {@var{C} =} power (@var{A}, @var{B}) +Return the element-by-element operation of @var{A} raised to the +@var{B} power. + +This function and @w{@tcode{@var{A} .^ @var{B}}} are equivalent. If several complex results are possible, returns the one with smallest non-negative argument (angle). Use @code{realpow}, @code{realsqrt}, @@ -6634,10 +6638,10 @@ DEFUN (ldivide, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ldivide (@var{x}, @var{y}) -Return the element-by-element left division of @var{x} and @var{y}. - -This function and @w{@tcode{@var{x} .@backslashchar{} @var{y}}} are +@deftypefn {} {@var{C} =} ldivide (@var{A}, @var{B}) +Return the element-by-element left division of @var{A} and @var{B}. + +This function and @w{@tcode{@var{A} .@backslashchar{} @var{B}}} are equivalent. @seealso{rdivide, mldivide, times, plus} @end deftypefn */) @@ -6647,8 +6651,8 @@ DEFUN (and, args, , doc: /* -*- texinfo -*- -@deftypefn {} {@var{z} =} and (@var{x}, @var{y}) -@deftypefnx {} {@var{z} =} and (@var{x1}, @var{x2}, @dots{}) +@deftypefn {} {@var{TF} =} and (@var{x}, @var{y}) +@deftypefnx {} {@var{TF} =} and (@var{x1}, @var{x2}, @dots{}) Return the logical AND of @var{x} and @var{y}. This function is equivalent to the operator syntax @@ -6668,8 +6672,8 @@ DEFUN (or, args, , doc: /* -*- texinfo -*- -@deftypefn {} {@var{z} =} or (@var{x}, @var{y}) -@deftypefnx {} {@var{z} =} or (@var{x1}, @var{x2}, @dots{}) +@deftypefn {} {@var{TF} =} or (@var{x}, @var{y}) +@deftypefnx {} {@var{TF} =} or (@var{x1}, @var{x2}, @dots{}) Return the logical OR of @var{x} and @var{y}. This function is equivalent to the operator syntax @@ -7312,10 +7316,10 @@ DEFUN (issorted, args, , doc: /* -*- texinfo -*- -@deftypefn {} {@var{tf} =} issorted (@var{a}) -@deftypefnx {} {@var{tf} =} issorted (@var{a}, @var{mode}) -@deftypefnx {} {@var{tf} =} issorted (@var{a}, "rows", @var{mode}) -Return true if the vector @var{a} is sorted according to @var{mode}, which +@deftypefn {} {@var{tf} =} issorted (@var{A}) +@deftypefnx {} {@var{tf} =} issorted (@var{A}, @var{mode}) +@deftypefnx {} {@var{tf} =} issorted (@var{A}, "rows", @var{mode}) +Return true if the vector @var{A} is sorted according to @var{mode}, which may be either @qcode{"ascend"}, @qcode{"descend"}, or @qcode{"either"}. By default, @var{mode} is @qcode{"ascend"}. NaNs are treated in the same @@ -7441,8 +7445,8 @@ DEFUN (nth_element, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} nth_element (@var{x}, @var{n}) -@deftypefnx {} {} nth_element (@var{x}, @var{n}, @var{dim}) +@deftypefn {} {@var{nel} =} nth_element (@var{x}, @var{n}) +@deftypefnx {} {@var{nel} =} nth_element (@var{x}, @var{n}, @var{dim}) Select the n-th smallest element of a vector, using the ordering defined by @code{sort}. @@ -7916,8 +7920,8 @@ DEFUN (merge, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} merge (@var{mask}, @var{tval}, @var{fval}) -@deftypefnx {} {} ifelse (@var{mask}, @var{tval}, @var{fval}) +@deftypefn {} {@var{M} =} merge (@var{mask}, @var{tval}, @var{fval}) +@deftypefnx {} {@var{M} =} ifelse (@var{mask}, @var{tval}, @var{fval}) Merge elements of @var{true_val} and @var{false_val}, depending on the value of @var{mask}. @@ -8147,9 +8151,9 @@ DEFUN (diff, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} diff (@var{x}) -@deftypefnx {} {} diff (@var{x}, @var{k}) -@deftypefnx {} {} diff (@var{x}, @var{k}, @var{dim}) +@deftypefn {} {@var{y} =} diff (@var{x}) +@deftypefnx {} {@var{y} =} diff (@var{x}, @var{k}) +@deftypefnx {} {@var{y} =} diff (@var{x}, @var{k}, @var{dim}) If @var{x} is a vector of length @math{n}, @w{@code{diff (@var{x})}} is the vector of first differences @tex @@ -8257,7 +8261,7 @@ DEFUN (repelems, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} repelems (@var{x}, @var{r}) +@deftypefn {} {@var{y} =} repelems (@var{x}, @var{r}) Construct a vector of repeated elements from @var{x}. @var{r} is a 2x@var{N} integer matrix specifying which elements to repeat diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/debug.cc --- a/libinterp/corefcn/debug.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/debug.cc Mon Apr 04 10:31:48 2022 -0700 @@ -111,24 +111,24 @@ @var{condition} will be evaluated, and execution will stop if @var{condition} is true. If @var{condition} cannot be evaluated, for example because it refers to an undefined variable, an error will be thrown. - Expressions with side effects (such as @code{y++ > 1}) will alter -variables, and should generally be avoided. Conditions containing quotes -(@samp{"}, @samp{'}) or comment characters (@samp{#}, @samp{%}) must be -enclosed in quotes. (This does not apply to conditions entered from the -editor's context menu.) For example: +Expressions with side effects (such as @code{y++ > 1}) will alter variables, +and should generally be avoided. Conditions containing quotes (@samp{"}, +@samp{'}) or comment characters (@samp{#}, @samp{%}) must be enclosed in +quotes. (This does not apply to conditions entered from the editor's context +menu.) For example: @example dbstop in axis at 246 if 'any (opt == "x")' @end example -The form specifying @var{event} does not cause a specific breakpoint at a -given function and line number. Instead it causes debug mode to be entered -when certain unexpected events are encountered. Possible values are +The form specifying @var{event} does not cause a specific breakpoint at a given +function and line number. Instead it causes debug mode to be entered when +certain unexpected events are encountered. Possible values are @table @code @item error -Stop when an error is reported. This is equivalent to specifying -both @code{debug_on_error (true)} and @code{debug_on_interrupt (true)}. +Stop when an error is reported. This is equivalent to specifying both +@code{debug_on_error (true)} and @code{debug_on_interrupt (true)}. @item caught error Stop when an error is caught by a try-catch block (not yet implemented). @@ -145,10 +145,9 @@ @end table The events @code{error}, @code{caught error}, and @code{warning} can all be -followed by a string specifying an error ID or warning ID@. If that is -done, only errors with the specified ID will cause execution to stop. To -stop on one of a set of IDs, multiple @code{dbstop} commands must be -issued. +followed by a string specifying an error ID or warning ID@. If that is done, +only errors with the specified ID will cause execution to stop. To stop on one +of a set of IDs, multiple @code{dbstop} commands must be issued. Breakpoints and events can be removed using the @code{dbclear} command with the same syntax. @@ -158,11 +157,11 @@ The optional output @var{rline} is the real line number where the breakpoint was set. This can differ from the specified line if the line is not -executable. For example, if a breakpoint attempted on a blank line then -Octave will set the real breakpoint at the next executable line. +executable. For example, if a breakpoint attempted on a blank line then Octave +will set the real breakpoint at the next executable line. -When a file is re-parsed, such as when it is modified outside the GUI, -all breakpoints within the file are cleared. +When a file is re-parsed, such as when it is modified outside the GUI, all +breakpoints within the file are cleared. @seealso{dbclear, dbstatus, dbstep, debug_on_error, debug_on_warning, debug_on_interrupt} @@ -332,7 +331,7 @@ DEFMETHOD (dbstatus, interp, args, nargout, doc: /* -*- texinfo -*- @deftypefn {} {} dbstatus -@deftypefnx {} {} dbstatus @var{func} +@deftypefnx {} {} dbstatus @var{fcn} @deftypefnx {} {@var{bp_list} =} dbstatus @dots{} Report the location of active breakpoints. @@ -340,11 +339,11 @@ functions with breakpoints and the line numbers where those breakpoints are set. -If a function name @var{func} is specified then only report breakpoints +If a function name @var{fcn} is specified then only report breakpoints for the named function and its subfunctions. The optional return argument @var{bp_list} is a struct array with the -following fields. +following fields: @table @asis @item name diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/defaults.cc --- a/libinterp/corefcn/defaults.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/defaults.cc Mon Apr 04 10:31:48 2022 -0700 @@ -450,8 +450,9 @@ DEFUN (OCTAVE_HOME, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} OCTAVE_HOME () +@deftypefn {} {@var{dir} =} OCTAVE_HOME () Return the name of the top-level Octave installation directory. + OCTAVE_HOME corresponds to the configuration variable @var{prefix}. @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_EXEC_HOME} @end deftypefn */) @@ -469,11 +470,12 @@ DEFUN (OCTAVE_EXEC_HOME, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} OCTAVE_EXEC_HOME () +@deftypefn {} {@var{dir} =} OCTAVE_EXEC_HOME () Return the name of the top-level Octave installation directory for -architecture-dependent files. If not specified separately, the value -is the same as OCTAVE_HOME@. OCTAVE_EXEC_HOME corresponds to the -configuration variable @var{exec_prefix}. +architecture-dependent files. + +If not specified separately, the value is the same as OCTAVE_HOME@. +OCTAVE_EXEC_HOME corresponds to the configuration variable @var{exec_prefix}. @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_HOME} @end deftypefn */) { @@ -490,7 +492,7 @@ DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} OCTAVE_VERSION () +@deftypefn {} {@var{verstr} =} OCTAVE_VERSION () Return the version number of Octave as a string. @seealso{ver, version} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/det.cc --- a/libinterp/corefcn/det.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/det.cc Mon Apr 04 10:31:48 2022 -0700 @@ -54,7 +54,7 @@ DEFUN (det, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} det (@var{A}) +@deftypefn {} {@var{d} =} det (@var{A}) @deftypefnx {} {[@var{d}, @var{rcond}] =} det (@var{A}) Compute the determinant of @var{A}. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/dirfns.cc --- a/libinterp/corefcn/dirfns.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/dirfns.cc Mon Apr 04 10:31:48 2022 -0700 @@ -91,8 +91,8 @@ directory does not exist, an error message is printed and the working directory is not changed. -@code{chdir} is an alias for @code{cd} and can be used in all of the same -calling formats. +Programming Note: @code{chdir} is an alias for @code{cd} and can be used with +all of the same calling formats. Compatibility Note: When called with no arguments, @sc{matlab} prints the present working directory rather than changing to the user's home directory. @@ -131,8 +131,7 @@ DEFUN (pwd, , , doc: /* -*- texinfo -*- -@deftypefn {} {} pwd () -@deftypefnx {} {@var{dir} =} pwd () +@deftypefn {} {@var{dir} =} pwd () Return the current working directory. @seealso{cd, dir, ls, mkdir, rmdir} @end deftypefn */) @@ -182,7 +181,9 @@ DEFUN (__mkdir__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __mkdir__ (@var{parent}, @var{dir}) +@deftypefn {} {} __mkdir__ (@var{dir}) +@deftypefnx {} {} __mkdir__ (@var{parent}, @var{dir}) +@deftypefnx {} {[@var{status}, @var{msg}, @var{msgid}] =} __mkdir__ (@dots{}) Internal function called by mkdir.m. @seealso{mkdir, rmdir, pwd, cd, umask} @end deftypefn */) @@ -392,7 +393,7 @@ DEFUNX ("readlink", Freadlink, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} readlink @var{symlink} +@deftypefn {} {@var{result} =} readlink @var{symlink} @deftypefnx {} {[@var{result}, @var{err}, @var{msg}] =} readlink (@var{symlink}) Read the value of the symbolic link @var{symlink}. @@ -470,7 +471,7 @@ DEFUN (glob, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} glob (@var{pattern}) +@deftypefn {} {@var{cstr} =} glob (@var{pattern}) Given an array of pattern strings (as a char array or a cell array) in @var{pattern}, return a cell array of filenames that match any of them, or an empty cell array if no patterns match. @@ -537,7 +538,7 @@ DEFUN (__wglob__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __wglob__ (@var{pattern}) +@deftypefn {} {@var{cstr} =} __wglob__ (@var{pattern}) Windows-like glob for dir. Given an array of pattern strings (as a char array or a cell array) in @@ -635,7 +636,7 @@ DEFUN (__fnmatch__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fnmatch (@var{pattern}, @var{string}) +@deftypefn {} {@var{TF} =} fnmatch (@var{pattern}, @var{string}) Return true or false for each element of @var{string} that matches any of the elements of the string array @var{pattern}, using the rules of filename pattern matching. @@ -664,7 +665,7 @@ DEFUN (filesep, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} filesep () +@deftypefn {} {@var{sep} =} filesep () @deftypefnx {} {} filesep ("all") Return the system-dependent character used to separate directory names. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/display.cc --- a/libinterp/corefcn/display.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/display.cc Mon Apr 04 10:31:48 2022 -0700 @@ -55,7 +55,7 @@ DEFMETHOD (have_window_system, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} have_window_system () +@deftypefn {} {@var{tf} =} have_window_system () Return true if a window system is available (X11, Windows, or Apple OS X) and false otherwise. @seealso{isguirunning} diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/dot.cc --- a/libinterp/corefcn/dot.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/dot.cc Mon Apr 04 10:31:48 2022 -0700 @@ -75,7 +75,8 @@ DEFUN (dot, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} dot (@var{x}, @var{y}, @var{dim}) +@deftypefn {} {@var{z} =} dot (@var{x}, @var{y}) +@deftypefnx {} {@var{z} =} dot (@var{x}, @var{y}, @var{dim}) Compute the dot product of two vectors. If @var{x} and @var{y} are matrices, calculate the dot products along the @@ -351,7 +352,7 @@ DEFUN (blkmm, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} blkmm (@var{A}, @var{B}) +@deftypefn {} {@var{C} =} blkmm (@var{A}, @var{B}) Compute products of matrix blocks. The blocks are given as 2-dimensional subarrays of the arrays @var{A}, diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/error.cc --- a/libinterp/corefcn/error.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/error.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1254,7 +1254,6 @@ @seealso{warning, lasterror} @end deftypefn */) { - int nargin = args.length (); if (nargin == 0) @@ -2078,7 +2077,7 @@ With one argument, set the last warning message to @var{msg}. -With two arguments, also set the last message identifier. +With two arguments, also set the last message identifier to @var{msgid}. @seealso{warning, lasterror, lasterr} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/event-manager.cc --- a/libinterp/corefcn/event-manager.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/event-manager.cc Mon Apr 04 10:31:48 2022 -0700 @@ -225,7 +225,7 @@ DEFMETHOD (__event_manager_enabled__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_enabled__ () +@deftypefn {} {@var{tf} =} __event_manager_enabled__ () Undocumented internal function. @end deftypefn */) { @@ -236,7 +236,7 @@ DEFMETHOD (__event_manager_have_dialogs__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_have_dialogs__ () +@deftypefn {} {@var{tf} =} __event_manager_have_dialogs__ () Undocumented internal function. @end deftypefn */) { @@ -247,7 +247,7 @@ DEFMETHOD (__event_manager_edit_file__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_edit_file__ (@var{file}) +@deftypefn {} {@var{status} =} __event_manager_edit_file__ (@var{file}) Undocumented internal function. @end deftypefn */) { @@ -279,7 +279,7 @@ DEFMETHOD (__event_manager_question_dialog__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_question_dialog__ (@var{msg}, @var{title}, @var{btn1}, @var{btn2}, @var{btn3}, @var{default}) +@deftypefn {} {@var{btn_val} =} __event_manager_question_dialog__ (@var{msg}, @var{title}, @var{btn1}, @var{btn2}, @var{btn3}, @var{default}) Undocumented internal function. @end deftypefn */) { @@ -306,7 +306,7 @@ DEFMETHOD (__event_manager_file_dialog__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_file_dialog__ (@var{filterlist}, @var{title}, @var{filename}, @var{multiselect}, @var{pathname}) +@deftypefn {} {[@var{fname}, @var{fpath}, @var{fltidx}] =} __event_manager_file_dialog__ (@var{filterlist}, @var{title}, @var{filename}, @var{multiselect}, @var{pathname}) Undocumented internal function. @end deftypefn */) { @@ -375,7 +375,7 @@ DEFMETHOD (__event_manager_list_dialog__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_list_dialog__ (@var{list}, @var{mode}, @var{size}, @var{initial}, @var{name}, @var{prompt}, @var{ok_string}, @var{cancel_string}) +@deftypefn {} {[@var{sel}, @var{ok}] =} __event_manager_list_dialog__ (@var{list}, @var{mode}, @var{size}, @var{initial}, @var{name}, @var{prompt}, @var{ok_string}, @var{cancel_string}) Undocumented internal function. @end deftypefn */) { @@ -431,7 +431,7 @@ DEFMETHOD (__event_manager_input_dialog__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_input_dialog__ (@var{prompt}, @var{title}, @var{rowscols}, @var{defaults}) +@deftypefn {} {@var{cstr} =} __event_manager_input_dialog__ (@var{prompt}, @var{title}, @var{rowscols}, @var{defaults}) Undocumented internal function. @end deftypefn */) { @@ -483,7 +483,7 @@ DEFMETHOD (__event_manager_named_icon__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_dialog_icons__ (@var{icon_name}) +@deftypefn {} {@var{icon} =} __event_manager_dialog_icons__ (@var{icon_name}) Undocumented internal function. @end deftypefn */) { @@ -501,9 +501,10 @@ return ovl (retval); } +// FIXME: Why does this function return any value at all? DEFMETHOD (__event_manager_show_preferences__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_show_preferences__ () +@deftypefn {} {@var{status} =} __event_manager_show_preferences__ () Undocumented internal function. @end deftypefn */) { @@ -514,7 +515,7 @@ DEFMETHOD (__event_manager_apply_preferences__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_apply_preferences__ () +@deftypefn {} {@var{status} =} __event_manager_apply_preferences__ () Undocumented internal function. @end deftypefn */) { @@ -525,7 +526,8 @@ DEFMETHOD (__event_manager_gui_preference__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_gui_preference__ () +@deftypefn {} {@var{prefval} =} __event_manager_gui_preference__ (@var{key}) +@deftypefnx {} {@var{prefval} =} __event_manager_gui_preference__ (@var{key}, @var{value}) Undocumented internal function. @end deftypefn */) { @@ -645,7 +647,7 @@ DEFMETHOD (__event_manager_show_documentation__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_show_documentation__ (@var{filename}) +@deftypefn {} {@var{status} =} __event_manager_show_documentation__ (@var{filename}) Undocumented internal function. @end deftypefn */) { @@ -661,7 +663,7 @@ DEFMETHOD (__event_manager_register_documentation__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_register_documentation__ (@var{filename}) +@deftypefn {} {@var{status} =} __event_manager_register_documentation__ (@var{filename}) Undocumented internal function. @end deftypefn */) { @@ -677,7 +679,7 @@ DEFMETHOD (__event_manager_unregister_documentation__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_unregister_documentation__ (@var{filename}) +@deftypefn {} {@var{status} =} __event_manager_unregister_documentation__ (@var{filename}) Undocumented internal function. @end deftypefn */) { @@ -758,7 +760,7 @@ DEFMETHOD (__event_manager_gui_status_update__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_gui_status_update__ (@var{feature}, @var{status}) +@deftypefn {} {@var{status} =} __event_manager_gui_status_update__ (@var{feature}, @var{status}) Internal function for updating the status of some features in the GUI. @end deftypefn */) { @@ -792,7 +794,7 @@ DEFMETHOD (__event_manager_update_gui_lexer__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __event_manager_update_gui_lexer__ () +@deftypefn {} {@var{status} =} __event_manager_update_gui_lexer__ () Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/fft.cc --- a/libinterp/corefcn/fft.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/fft.cc Mon Apr 04 10:31:48 2022 -0700 @@ -195,9 +195,9 @@ DEFUN (fft, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fft (@var{x}) -@deftypefnx {} {} fft (@var{x}, @var{n}) -@deftypefnx {} {} fft (@var{x}, @var{n}, @var{dim}) +@deftypefn {} {@var{y} =} fft (@var{x}) +@deftypefnx {} {@var{y} =} fft (@var{x}, @var{n}) +@deftypefnx {} {@var{y} =} fft (@var{x}, @var{n}, @var{dim}) Compute the discrete Fourier transform of @var{x} using a Fast Fourier Transform (FFT) algorithm. @@ -224,23 +224,23 @@ DEFUN (ifft, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ifft (@var{x}) -@deftypefnx {} {} ifft (@var{x}, @var{n}) -@deftypefnx {} {} ifft (@var{x}, @var{n}, @var{dim}) -Compute the inverse discrete Fourier transform of @var{x} +@deftypefn {} {@var{x} =} ifft (@var{y}) +@deftypefnx {} {@var{x} =} ifft (@var{y}, @var{n}) +@deftypefnx {} {@var{x} =} ifft (@var{y}, @var{n}, @var{dim}) +Compute the inverse discrete Fourier transform of @var{y} using a Fast Fourier Transform (FFT) algorithm. The inverse FFT is calculated along the first non-singleton dimension -of the array. Thus if @var{x} is a matrix, @code{fft (@var{x})} computes -the inverse FFT for each column of @var{x}. +of the array. Thus if @var{y} is a matrix, @code{ifft (@var{y})} computes +the inverse FFT for each column of @var{y}. If called with two arguments, @var{n} is expected to be an integer -specifying the number of elements of @var{x} to use, or an empty +specifying the number of elements of @var{y} to use, or an empty matrix to specify that its value should be ignored. If @var{n} is larger than the dimension along which the inverse FFT is calculated, then -@var{x} is resized and padded with zeros. Otherwise, if @var{n} is +@var{y} is resized and padded with zeros. Otherwise, if @var{n} is smaller than the dimension along which the inverse FFT is calculated, -then @var{x} is truncated. +then @var{y} is truncated. If called with three arguments, @var{dim} is an integer specifying the dimension of the matrix along which the inverse FFT is performed. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/fft2.cc --- a/libinterp/corefcn/fft2.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/fft2.cc Mon Apr 04 10:31:48 2022 -0700 @@ -139,8 +139,8 @@ DEFUN (fft2, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fft2 (@var{A}) -@deftypefnx {} {} fft2 (@var{A}, @var{m}, @var{n}) +@deftypefn {} {@var{B} =} fft2 (@var{A}) +@deftypefnx {} {@var{B} =} fft2 (@var{A}, @var{m}, @var{n}) Compute the two-dimensional discrete Fourier transform of @var{A} using a Fast Fourier Transform (FFT) algorithm. @@ -159,17 +159,17 @@ DEFUN (ifft2, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ifft2 (@var{A}) -@deftypefnx {} {} ifft2 (@var{A}, @var{m}, @var{n}) -Compute the inverse two-dimensional discrete Fourier transform of @var{A} +@deftypefn {} {@var{A} =} ifft2 (@var{B}) +@deftypefnx {} {@var{A} =} ifft2 (@var{B}, @var{m}, @var{n}) +Compute the inverse two-dimensional discrete Fourier transform of @var{B} using a Fast Fourier Transform (FFT) algorithm. The optional arguments @var{m} and @var{n} may be used specify the number of -rows and columns of @var{A} to use. If either of these is larger than the -size of @var{A}, @var{A} is resized and padded with zeros. +rows and columns of @var{B} to use. If either of these is larger than the +size of @var{B}, @var{B} is resized and padded with zeros. -If @var{A} is a multi-dimensional matrix, each two-dimensional sub-matrix -of @var{A} is treated separately. +If @var{B} is a multi-dimensional matrix, each two-dimensional sub-matrix +of @var{B} is treated separately. @seealso{fft2, ifft, ifftn, fftw} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/fftn.cc --- a/libinterp/corefcn/fftn.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/fftn.cc Mon Apr 04 10:31:48 2022 -0700 @@ -126,8 +126,8 @@ DEFUN (fftn, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fftn (@var{A}) -@deftypefnx {} {} fftn (@var{A}, @var{size}) +@deftypefn {} {@var{B} =} fftn (@var{A}) +@deftypefnx {} {@var{B} =} fftn (@var{A}, @var{size}) Compute the N-dimensional discrete Fourier transform of @var{A} using a Fast Fourier Transform (FFT) algorithm. @@ -145,16 +145,16 @@ DEFUN (ifftn, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ifftn (@var{A}) -@deftypefnx {} {} ifftn (@var{A}, @var{size}) -Compute the inverse N-dimensional discrete Fourier transform of @var{A} +@deftypefn {} {@var{A} =} ifftn (@var{B}) +@deftypefnx {} {@var{A} =} ifftn (@var{B}, @var{size}) +Compute the inverse N-dimensional discrete Fourier transform of @var{B} using a Fast Fourier Transform (FFT) algorithm. The optional vector argument @var{size} may be used specify the dimensions of the array to be used. If an element of @var{size} is smaller than the -corresponding dimension of @var{A}, then the dimension of @var{A} is +corresponding dimension of @var{B}, then the dimension of @var{B} is truncated prior to performing the inverse FFT@. Otherwise, if an element of -@var{size} is larger than the corresponding dimension then @var{A} is +@var{size} is larger than the corresponding dimension then @var{B} is resized and padded with zeros. @seealso{fftn, ifft, ifft2, fftw} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/file-io.cc --- a/libinterp/corefcn/file-io.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/file-io.cc Mon Apr 04 10:31:48 2022 -0700 @@ -175,8 +175,7 @@ DEFMETHOD (fclose, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fclose (@var{fid}) -@deftypefnx {} {} fclose ("all") +@deftypefn {} {@var{status} =} fclose (@var{fid}) @deftypefnx {} {@var{status} =} fclose ("all") Close the file specified by the file descriptor @var{fid}. @@ -219,7 +218,7 @@ DEFMETHOD (fflush, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fflush (@var{fid}) +@deftypefn {} {@var{status} =} fflush (@var{fid}) Flush output to file descriptor @var{fid}. @code{fflush} returns 0 on success and an OS dependent error value @@ -702,8 +701,11 @@ Move the file pointer to the beginning of the file specified by file descriptor @var{fid}. -@code{frewind} returns 0 for success, and -1 if an error is encountered. It -is equivalent to @code{fseek (@var{fid}, 0, SEEK_SET)}. +If an output @var{status} is requested then @code{frewind} returns 0 for +success, and -1 if an error is encountered. + +Programming Note: @code{frewind} is equivalent to +@code{fseek (@var{fid}, 0, SEEK_SET)}. @seealso{fseek, ftell, fopen} @end deftypefn */) { @@ -726,9 +728,8 @@ DEFMETHOD (fseek, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fseek (@var{fid}, @var{offset}) -@deftypefnx {} {} fseek (@var{fid}, @var{offset}, @var{origin}) -@deftypefnx {} {@var{status} =} fseek (@dots{}) +@deftypefn {} {@var{status} =} fseek (@var{fid}, @var{offset}) +@deftypefnx {} {@var{status} =} fseek (@var{fid}, @var{offset}, @var{origin}) Set the file pointer to the location @var{offset} within the file @var{fid}. The pointer is positioned @var{offset} characters from the @var{origin}, which @@ -831,7 +832,8 @@ If @var{fid} is omitted, the output is written to @code{stdout} making the function exactly equivalent to @code{printf}. -The optional output returns the number of bytes written to the file. +The optional output @var{numbytes} returns the number of bytes written to the +file. Implementation Note: For compatibility with @sc{matlab}, escape sequences in the template string (e.g., @qcode{"@backslashchar{}n"} => newline) are @@ -846,16 +848,19 @@ DEFMETHOD (printf, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} printf (@var{template}, @dots{}) +@deftypefn {} {} printf (@var{template}, @dots{}) +@deftypefnx {} {@var{numbytes} =} printf (@dots{}) Print optional arguments under the control of the template string -@var{template} to the stream @code{stdout} and return the number of -characters printed. +@var{template} to the stream @code{stdout} and return the number of characters +printed. @ifclear OCTAVE_MANUAL -See the Formatted Output section of the GNU Octave manual for a -complete description of the syntax of the template string. +See the Formatted Output section of the GNU Octave manual for a complete +description of the syntax of the template string. @end ifclear +The optional output @var{numbytes} returns the number of bytes printed. + Implementation Note: For compatibility with @sc{matlab}, escape sequences in the template string (e.g., @qcode{"@backslashchar{}n"} => newline) are expanded even when the template string is defined with single quotes. @@ -886,8 +891,7 @@ DEFMETHOD (fputs, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fputs (@var{fid}, @var{string}) -@deftypefnx {} {@var{status} =} fputs (@var{fid}, @var{string}) +@deftypefn {} {@var{status} =} fputs (@var{fid}, @var{string}) Write the string @var{string} to the file with file descriptor @var{fid}. The string is written to the file with no additional formatting. Use @@ -933,8 +937,7 @@ DEFMETHOD (puts, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} puts (@var{string}) -@deftypefnx {} {@var{status} =} puts (@var{string}) +@deftypefn {} {@var{status} =} puts (@var{string}) Write a string to the standard output with no formatting. The string is written verbatim to the standard output. Use @code{disp} to @@ -953,7 +956,7 @@ DEFUN (sprintf, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sprintf (@var{template}, @dots{}) +@deftypefn {} {@var{str} =} sprintf (@var{template}, @dots{}) This is like @code{printf}, except that the output is returned as a string. @@ -2677,23 +2680,23 @@ DEFMETHOD (fwrite, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fwrite (@var{fid}, @var{data}) -@deftypefnx {} {} fwrite (@var{fid}, @var{data}, @var{precision}) -@deftypefnx {} {} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}) -@deftypefnx {} {} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}, @var{arch}) -@deftypefnx {} {@var{count} =} fwrite (@dots{}) +@deftypefn {} {@var{count} =} fwrite (@var{fid}, @var{data}) +@deftypefnx {} {@var{count} =} fwrite (@var{fid}, @var{data}, @var{precision}) +@deftypefnx {} {@var{count} =} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}) +@deftypefnx {} {@var{count} =} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}, @var{arch}) Write data in binary form to the file specified by the file descriptor -@var{fid}, returning the number of values @var{count} successfully written -to the file. - -The argument @var{data} is a matrix of values that are to be written to -the file. The values are extracted in column-major order. +@var{fid}. + +The argument @var{data} is a matrix of values that are to be written to the +file. The values are extracted in column-major order. The remaining arguments @var{precision}, @var{skip}, and @var{arch} are optional, and are interpreted as described for @code{fread}. -The behavior of @code{fwrite} is undefined if the values in @var{data} -are too large to fit in the specified precision. +The output @var{count} is the number of data items successfully written. + +Programming Note: The behavior of @code{fwrite} is undefined if the values in +@var{data} are too large to fit in the specified precision. @seealso{fread, fputs, fprintf, fopen} @end deftypefn */) { @@ -2867,10 +2870,13 @@ DEFMETHODX ("pclose", Fpclose, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} pclose (@var{fid}) -Close a file identifier that was opened by @code{popen}. - -The function @code{fclose} may also be used for the same purpose. +@deftypefn {} {@var{status} =} pclose (@var{fid}) +Close a file identifier @var{fid} that was opened by @code{popen}. + +If successful, @code{fclose} returns 0, otherwise, it returns -1. + +Programming Note: The function @code{fclose} may also be used for the same +purpose. @seealso{fclose, popen} @end deftypefn */) { @@ -3173,7 +3179,7 @@ DEFUNX ("umask", Fumask, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} umask (@var{mask}) +@deftypefn {} {@var{oldmask} =} umask (@var{mask}) Set the permission mask for file creation. The parameter @var{mask} is an integer, interpreted as an octal number. @@ -3218,7 +3224,7 @@ DEFUNX ("P_tmpdir", FP_tmpdir, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} P_tmpdir () +@deftypefn {} {@var{sys_tmpdir} =} P_tmpdir () Return the name of the host system's @strong{default} directory for temporary files. @@ -3240,7 +3246,7 @@ DEFUNX ("SEEK_SET", FSEEK_SET, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} SEEK_SET () +@deftypefn {} {@var{fseek_origin} =} SEEK_SET () Return the numerical value to pass to @code{fseek} to position the file pointer relative to the beginning of the file. @seealso{SEEK_CUR, SEEK_END, fseek} @@ -3251,7 +3257,7 @@ DEFUNX ("SEEK_CUR", FSEEK_CUR, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} SEEK_CUR () +@deftypefn {} {@var{fseek_origin} =} SEEK_CUR () Return the numerical value to pass to @code{fseek} to position the file pointer relative to the current position. @seealso{SEEK_SET, SEEK_END, fseek} @@ -3262,7 +3268,7 @@ DEFUNX ("SEEK_END", FSEEK_END, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} SEEK_END () +@deftypefn {} {@var{fseek_origin} =} SEEK_END () Return the numerical value to pass to @code{fseek} to position the file pointer relative to the end of the file. @seealso{SEEK_SET, SEEK_CUR, fseek} @@ -3283,7 +3289,7 @@ DEFMETHODX ("stdin", Fstdin, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} stdin () +@deftypefn {} {@var{fid} =} stdin () Return the numeric value corresponding to the standard input stream. When Octave is used interactively, stdin is filtered through the command @@ -3298,7 +3304,7 @@ DEFMETHODX ("stdout", Fstdout, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} stdout () +@deftypefn {} {@var{fid} =} stdout () Return the numeric value corresponding to the standard output stream. Data written to the standard output may be filtered through the pager. @@ -3312,7 +3318,7 @@ DEFMETHODX ("stderr", Fstderr, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} stderr () +@deftypefn {} {@var{fid} =} stderr () Return the numeric value corresponding to the standard error stream. Even if paging is turned on, the standard error is not sent to the pager. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/getgrent.cc --- a/libinterp/corefcn/getgrent.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/getgrent.cc Mon Apr 04 10:31:48 2022 -0700 @@ -136,7 +136,7 @@ DEFUN (setgrent, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} setgrent () +@deftypefn {} {[@var{status}, @var{msg}] =} setgrent () Return the internal pointer to the beginning of the group database. @seealso{getgrent, endgrent} @end deftypefn */) @@ -154,7 +154,7 @@ DEFUN (endgrent, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} endgrent () +@deftypefn {} {[@var{status}, @var{msg}] =} endgrent () Close the group database. @seealso{getgrent, setgrent} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/getpwent.cc --- a/libinterp/corefcn/getpwent.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/getpwent.cc Mon Apr 04 10:31:48 2022 -0700 @@ -142,7 +142,7 @@ DEFUN (setpwent, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} setpwent () +@deftypefn {} {[@var{status}, @var{msg}] =} setpwent () Return the internal pointer to the beginning of the password database. @seealso{getpwent, endpwent} @end deftypefn */) @@ -160,7 +160,7 @@ DEFUN (endpwent, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} endpwent () +@deftypefn {} {[@var{status}, @var{msg}] =} endpwent () Close the password database. @seealso{getpwent, setpwent} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/getrusage.cc --- a/libinterp/corefcn/getrusage.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/getrusage.cc Mon Apr 04 10:31:48 2022 -0700 @@ -38,7 +38,7 @@ DEFUN (getrusage, , , doc: /* -*- texinfo -*- -@deftypefn {} {} getrusage () +@deftypefn {} {@var{procstats} =} getrusage () Return a structure containing a number of statistics about the current Octave process. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/graphics.cc Mon Apr 04 10:31:48 2022 -0700 @@ -12784,7 +12784,7 @@ DEFUN (__is_handle_visible__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __is_handle_visible__ (@var{h}) +@deftypefn {} {@var{tf} =} __is_handle_visible__ (@var{h}) Undocumented internal function. @end deftypefn */) { @@ -13249,7 +13249,7 @@ DEFMETHOD (__get__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __get__ (@var{h}) +@deftypefn {} {@var{props} =} __get__ (@var{h}) Undocumented internal function. @end deftypefn */) { @@ -13371,7 +13371,7 @@ DEFMETHOD (__go_figure__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_figure__ (@var{fignum}) +@deftypefn {} {@var{hfig} =} __go_figure__ (@var{fignum}) Undocumented internal function. @end deftypefn */) { @@ -13513,7 +13513,7 @@ DEFMETHOD (__calc_dimensions__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __calc_dimensions__ (@var{axes}) +@deftypefn {} {@var{ndims} =} __calc_dimensions__ (@var{axes}) Internal function. Determine the number of dimensions in a graphics object, either 2 or 3. @@ -13533,7 +13533,7 @@ DEFMETHOD (__go_axes__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_axes__ (@var{parent}) +@deftypefn {} {@var{hax} =} __go_axes__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13542,7 +13542,7 @@ DEFMETHOD (__go_line__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_line__ (@var{parent}) +@deftypefn {} {@var{hl} =} __go_line__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13551,7 +13551,7 @@ DEFMETHOD (__go_text__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_text__ (@var{parent}) +@deftypefn {} {@var{ht} =} __go_text__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13560,7 +13560,7 @@ DEFMETHOD (__go_image__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_image__ (@var{parent}) +@deftypefn {} {@var{hi} =} __go_image__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13569,7 +13569,7 @@ DEFMETHOD (__go_surface__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_surface__ (@var{parent}) +@deftypefn {} {@var{hs} =} __go_surface__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13578,7 +13578,7 @@ DEFMETHOD (__go_patch__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_patch__ (@var{parent}) +@deftypefn {} {@var{hp} =} __go_patch__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13587,7 +13587,7 @@ DEFMETHOD (__go_scatter__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_scatter__ (@var{parent}) +@deftypefn {} {@var{hs} =} __go_scatter__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13596,7 +13596,7 @@ DEFMETHOD (__go_light__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_light__ (@var{parent}) +@deftypefn {} {@var{hl} =} __go_light__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13605,7 +13605,7 @@ DEFMETHOD (__go_hggroup__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_hggroup__ (@var{parent}) +@deftypefn {} {@var{hgg} =} __go_hggroup__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13614,7 +13614,7 @@ DEFMETHOD (__go_uimenu__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uimenu__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uimenu__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13623,7 +13623,7 @@ DEFMETHOD (__go_uicontrol__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uicontrol__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uicontrol__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13632,7 +13632,7 @@ DEFMETHOD (__go_uibuttongroup__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uibuttongroup__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uibuttongroup__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13641,7 +13641,7 @@ DEFMETHOD (__go_uipanel__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uipanel__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uipanel__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13650,7 +13650,7 @@ DEFMETHOD (__go_uicontextmenu__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uicontextmenu__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uicontextmenu__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13659,7 +13659,7 @@ DEFMETHOD (__go_uitable__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uitable__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uitable__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13668,7 +13668,7 @@ DEFMETHOD (__go_uitoolbar__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uitoolbar__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uitoolbar__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13677,7 +13677,7 @@ DEFMETHOD (__go_uipushtool__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uipushtool__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uipushtool__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13686,7 +13686,7 @@ DEFMETHOD (__go_uitoggletool__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_uitoggletool__ (@var{parent}) +@deftypefn {} {@var{hui} =} __go_uitoggletool__ (@var{parent}) Undocumented internal function. @end deftypefn */) { @@ -13727,7 +13727,7 @@ DEFMETHOD (__go_handles__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_handles__ (@var{show_hidden}) +@deftypefn {} {@var{hg_list} =} __go_handles__ (@var{show_hidden}) Undocumented internal function. @end deftypefn */) { @@ -13745,7 +13745,7 @@ DEFMETHOD (__go_figure_handles__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __go_figure_handles__ (@var{show_hidden}) +@deftypefn {} {@var{hfig_list} =} __go_figure_handles__ (@var{show_hidden}) Undocumented internal function. @end deftypefn */) { @@ -13862,7 +13862,7 @@ DEFMETHOD (available_graphics_toolkits, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} available_graphics_toolkits () +@deftypefn {} {@var{toolkits} =} available_graphics_toolkits () Return a cell array of registered graphics toolkits. @seealso{graphics_toolkit, register_graphics_toolkit} @end deftypefn */) @@ -13878,8 +13878,11 @@ DEFMETHOD (register_graphics_toolkit, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} register_graphics_toolkit (@var{toolkit}) +@deftypefn {} {} register_graphics_toolkit ("@var{toolkit}") List @var{toolkit} as an available graphics toolkit. + +Programming Note: No input validation is done on the input string; it is simply +added to the list of possible graphics toolkits. @seealso{available_graphics_toolkits} @end deftypefn */) { @@ -13901,7 +13904,7 @@ DEFMETHOD (loaded_graphics_toolkits, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} loaded_graphics_toolkits () +@deftypefn {} {@var{toolkits} =} loaded_graphics_toolkits () Return a cell array of the currently loaded graphics toolkits. @seealso{available_graphics_toolkits} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/hash.cc --- a/libinterp/corefcn/hash.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/hash.cc Mon Apr 04 10:31:48 2022 -0700 @@ -53,9 +53,9 @@ DEFUN (hash, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} hash (@var{hfun}, @var{str}) +@deftypefn {} {@var{hashval} =} hash ("@var{hashfcn}", @var{str}) Calculate the hash value of the string @var{str} using the hash function -@var{hfun}. +@var{hashfcn}. The available hash functions are given in the table below. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/help.cc --- a/libinterp/corefcn/help.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/help.cc Mon Apr 04 10:31:48 2022 -0700 @@ -786,8 +786,8 @@ DEFUN (__operators__, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __operators__ () -Undocumented internal function. +@deftypefn {} {@var{cstr} =} __operators__ () +Return a cell array of strings of all possible Octave operators. @end deftypefn */) { return ovl (Cell (operator_names)); @@ -804,7 +804,7 @@ DEFMETHOD (__builtins__, interp, , , doc: /* -*- texinfo -*- @deftypefn {} {} __builtins__ () -Undocumented internal function. +Return a cell array of all builtin (compiled) functions available to Octave. @end deftypefn */) { symbol_table& symtab = interp.get_symbol_table (); @@ -816,7 +816,7 @@ DEFMETHOD (localfunctions, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} localfunctions () +@deftypefn {} {@var{subfcn_list} =} localfunctions () Return a list of all local functions, i.e., subfunctions, within the current file. @@ -872,7 +872,7 @@ DEFMETHOD (__which__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __which__ (@var{name}, @dots{}) +@deftypefn {} {@var{var_struct} =} __which__ (@var{name}, @dots{}) Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/input.cc --- a/libinterp/corefcn/input.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/input.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1248,13 +1248,24 @@ DEFUN (completion_matches, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} completion_matches (@var{hint}) -Generate possible completions given @var{hint}. +@deftypefn {} {@var{completion_list} =} completion_matches ("@var{hint}") +Generate possible word completions for Octave given the character sequence +@var{hint}. + +This function is provided for the benefit of programs like Emacs which might be +controlling Octave and handling user input. For example: -This function is provided for the benefit of programs like Emacs which -might be controlling Octave and handling user input. The current -command number is not incremented when this function is called. This is -a feature, not a bug. +@example +@group +completion_matches ("sine") +@result{} +sinetone +sinewave +@end group +@end example + +Programming Note: The current command number in Octave is not incremented when +this function is called. This is a feature, not a bug. @end deftypefn */) { if (args.length () != 1) @@ -1332,7 +1343,8 @@ DEFUN (readline_read_init_file, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} readline_read_init_file (@var{file}) +@deftypefn {} {} readline_read_init_file () +@deftypefnx {} {} readline_read_init_file (@var{file}) Read the readline library initialization file @var{file}. If @var{file} is omitted, read the default initialization file @@ -1555,7 +1567,7 @@ DEFMETHOD (__gud_mode__, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} __gud_mode__ () +@deftypefn {} {@var{state} =} __gud_mode__ () Undocumented internal function. @end deftypefn */) { @@ -1566,8 +1578,12 @@ DEFMETHOD (__mfile_encoding__, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {@var{current_encoding} =} __mfile_encoding__ (@var{new_encoding}) -Set and query the codepage that is used for reading .m files. +@deftypefn {} {@var{current_encoding} =} __mfile_encoding__ () +@deftypefnx {} {} __mfile_encoding__ (@var{new_encoding}) +@deftypefnx {} {@var{old_encoding} =} __mfile_encoding__ (@var{new_encoding}) +Query or set the codepage that is used for reading m-files. + +The input and output are strings naming a particular codepage, e.g., "utf-8". @end deftypefn */) { input_system& input_sys = interp.get_input_system (); @@ -1578,22 +1594,22 @@ DEFMETHOD (dir_encoding, interp, args, nargout, doc: /* -*- texinfo -*- @deftypefn {} {@var{current_encoding} =} dir_encoding (@var{dir}) -@deftypefnx {} {@var{prev_encoding} =} dir_encoding (@var{dir}, @var{encoding}) -@deftypefnx {} {} dir_encoding (@dots{}) -Set and query the @var{encoding} that is used for reading m-files in @var{dir}. +@deftypefnx {} {} dir_encoding (@var{dir}, @var{new_encoding}) +@deftypefnx {} {} dir_encoding (@var{dir}, "delete") +@deftypefnx {} {@var{old_encoding} =} dir_encoding (@var{dir}, @var{new_encoding}) +Query or set the @var{encoding} that is used for reading m-files in @var{dir}. -That encoding overrides the (globally set) m-file encoding. +The per-directory encoding overrides the (globally set) m-file encoding. -The string @var{DIR} must match the form how the directory would appear in the -load path. +The string @var{DIR} must match how the directory would appear in the load +path. -The @var{encoding} must be a valid encoding identifier or @qcode{"delete"}. In -the latter case, the (globally set) m-file encoding will be used for the given -@var{dir}. +The @var{new_encoding} input must be a valid encoding identifier or +@qcode{"delete"}. In the latter case, any per-directory encoding is removed +and the (globally set) m-file encoding will be used for the given @var{dir}. -The currently or previously used encoding is returned in @var{current_encoding} -or @var{prev_encoding}, respectively. The output argument must be explicitly -requested. +The currently or previously used encoding is returned only if an output +argument is requested. The directory encoding is automatically read from the file @file{.oct-config} when a new path is added to the load path (for example with @code{addpath}). diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/interpreter.cc Mon Apr 04 10:31:48 2022 -0700 @@ -236,7 +236,9 @@ DEFMETHOD (atexit, interp, args, nargout, doc: /* -*- texinfo -*- @deftypefn {} {} atexit (@var{fcn}) -@deftypefnx {} {} atexit (@var{fcn}, @var{flag}) +@deftypefnx {} {} atexit (@var{fcn}, true) +@deftypefnx {} {} atexit (@var{fcn}, false) +@deftypefnx {} {@var{status} =} atexit (@var{fcn}, false) Register a function to be called when Octave exits. For example, @@ -267,8 +269,12 @@ will remove the function from the list and Octave will not call @code{last_words} when it exits. -Note that @code{atexit} only removes the first occurrence of a function -from the list, so if a function was placed in the list multiple times with +The optional output @var{status} is only available when unregistering a +function. The value is true if the unregistering was succesful and false +otherwise. + +Progamming Note: @code{atexit} only removes the first occurrence of a function +from the list; if a function was placed in the list multiple times with @code{atexit}, it must also be removed from the list multiple times. @seealso{quit} @end deftypefn */) @@ -301,8 +307,8 @@ DEFMETHOD (__traditional__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __traditional__ () -Undocumented internal function. +@deftypefn {} {@var{tf} =} __traditional__ () +Return true if Octave was invoked with the @env{--traditional} option. @end deftypefn */) { return ovl (interp.traditional ()); diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/kron.cc --- a/libinterp/corefcn/kron.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/kron.cc Mon Apr 04 10:31:48 2022 -0700 @@ -245,14 +245,14 @@ DEFUN (kron, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} kron (@var{A}, @var{B}) -@deftypefnx {} {} kron (@var{A1}, @var{A2}, @dots{}) +@deftypefn {} {@var{C} =} kron (@var{A}, @var{B}) +@deftypefnx {} {@var{C} =} kron (@var{A1}, @var{A2}, @dots{}) Form the Kronecker product of two or more matrices. This is defined block by block as @example -x = [ a(i,j)*b ] +c = [ a(i,j)*b ] @end example For example: diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/load-path.cc --- a/libinterp/corefcn/load-path.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/load-path.cc Mon Apr 04 10:31:48 2022 -0700 @@ -2462,8 +2462,8 @@ DEFUN (genpath, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} genpath (@var{dir}) -@deftypefnx {} {} genpath (@var{dir}, @var{skip}, @dots{}) +@deftypefn {} {@var{pathstr} =} genpath (@var{dir}) +@deftypefnx {} {@var{pathstr} =} genpath (@var{dir}, @var{skipdir1}, @dots{}) Return a path constructed from @var{dir} and all its subdirectories. The path does not include package directories (beginning with @samp{+}), @@ -2516,8 +2516,9 @@ DEFMETHOD (command_line_path, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} command_line_path () -Return the command line path variable. +@deftypefn {} {@var{pathstr} =} command_line_path () +Return the path argument given to Octave at the command line when the +interpreter was started (@env{--path @var{arg}}). @seealso{path, addpath, rmpath, genpath, pathdef, savepath, pathsep} @end deftypefn */) @@ -2532,9 +2533,10 @@ DEFMETHOD (restoredefaultpath, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} restoredefaultpath () +@deftypefn {} {@var{pathstr} =} restoredefaultpath () Restore Octave's path to its initial state at startup. +The re-initialized path is returned as an output. @seealso{path, addpath, rmpath, genpath, pathdef, savepath, pathsep} @end deftypefn */) { @@ -2555,7 +2557,7 @@ DEFMETHOD (__pathorig__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {@var{val} =} __pathorig__ () +@deftypefn {} {@var{str} =} __pathorig__ () Undocumented internal function. @end deftypefn */) { @@ -2624,6 +2626,7 @@ doc: /* -*- texinfo -*- @deftypefn {} {} addpath (@var{dir1}, @dots{}) @deftypefnx {} {} addpath (@var{dir1}, @dots{}, @var{option}) +@deftypefnx {} {@var{oldpath} =} addpath (@dots{}) Add named directories to the function search path. If @var{option} is @qcode{"-begin"} or 0 (the default), prepend the directory @@ -2761,7 +2764,8 @@ DEFMETHOD (rmpath, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} rmpath (@var{dir1}, @dots{}) +@deftypefn {} {} rmpath (@var{dir1}, @dots{}) +@deftypefnx {} {@var{oldpath} =} rmpath (@var{dir1}, @dots{}) Remove @var{dir1}, @dots{} from the current function search path. In addition to accepting individual directory arguments, lists of @@ -2821,7 +2825,7 @@ DEFMETHOD (__dump_load_path__, interp, , , doc: /* -*- texinfo -*- @deftypefn {} {} __dump_load_path__ () -Undocumented internal function. +Pretty print Octave path directories and the files within each directory. @end deftypefn */) { load_path& lp = interp.get_load_path (); diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/mappers.cc --- a/libinterp/corefcn/mappers.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/mappers.cc Mon Apr 04 10:31:48 2022 -0700 @@ -41,8 +41,8 @@ DEFUN (abs, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} abs (@var{z}) -Compute the magnitude of @var{z}. +@deftypefn {} {@var{z} =} abs (@var{x}) +Compute the magnitude of @var{x}. The magnitude is defined as @tex @@ -88,7 +88,7 @@ DEFUN (acos, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} acos (@var{x}) +@deftypefn {} {@var{y} =} acos (@var{x}) Compute the inverse cosine in radians for each element of @var{x}. @seealso{cos, acosd} @end deftypefn */) @@ -148,7 +148,7 @@ DEFUN (acosh, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} acosh (@var{x}) +@deftypefn {} {@var{y} =} acosh (@var{x}) Compute the inverse hyperbolic cosine for each element of @var{x}. @seealso{cosh} @end deftypefn */) @@ -220,7 +220,7 @@ DEFUN (angle, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} angle (@var{z}) +@deftypefn {} {@var{theta} =} angle (@var{z}) @xref{XREFarg,,@code{arg}}. @seealso{arg} @end deftypefn */) @@ -233,8 +233,8 @@ DEFUN (arg, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} arg (@var{z}) -@deftypefnx {} {} angle (@var{z}) +@deftypefn {} {@var{theta} =} arg (@var{z}) +@deftypefnx {} {@var{theta} =} angle (@var{z}) Compute the argument, i.e., angle of @var{z}. This is defined as, @@ -289,7 +289,7 @@ DEFUN (asin, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} asin (@var{x}) +@deftypefn {} {@var{y} =} asin (@var{x}) Compute the inverse sine in radians for each element of @var{x}. @seealso{sin, asind} @end deftypefn */) @@ -354,7 +354,7 @@ DEFUN (asinh, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} asinh (@var{x}) +@deftypefn {} {@var{y} =} asinh (@var{x}) Compute the inverse hyperbolic sine for each element of @var{x}. @seealso{sinh} @end deftypefn */) @@ -396,7 +396,7 @@ DEFUN (atan, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} atan (@var{x}) +@deftypefn {} {@var{y} =} atan (@var{x}) Compute the inverse tangent in radians for each element of @var{x}. @seealso{tan, atand} @end deftypefn */) @@ -435,7 +435,7 @@ DEFUN (atanh, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} atanh (@var{x}) +@deftypefn {} {@var{y} =} atanh (@var{x}) Compute the inverse hyperbolic tangent for each element of @var{x}. @seealso{tanh} @end deftypefn */) @@ -470,7 +470,7 @@ DEFUN (cbrt, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cbrt (@var{x}) +@deftypefn {} {@var{y} =} cbrt (@var{x}) Compute the real-valued cube root of each element of @var{x}. Unlike @code{@var{x}^(1/3)}, the result will be negative if @var{x} is @@ -502,7 +502,7 @@ DEFUN (ceil, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} ceil (@var{x}) +@deftypefn {} {@var{y} =} ceil (@var{x}) Return the smallest integer not less than @var{x}. This is equivalent to rounding towards positive infinity. @@ -545,7 +545,7 @@ DEFUN (conj, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} conj (@var{z}) +@deftypefn {} {@var{zc} =} conj (@var{z}) Return the complex conjugate of @var{z}. The complex conjugate is defined as @@ -583,7 +583,7 @@ DEFUN (cos, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cos (@var{x}) +@deftypefn {} {@var{y} =} cos (@var{x}) Compute the cosine for each element of @var{x} in radians. @seealso{acos, cosd, cosh} @end deftypefn */) @@ -617,7 +617,7 @@ DEFUN (cosh, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cosh (@var{x}) +@deftypefn {} {@var{y} =} cosh (@var{x}) Compute the hyperbolic cosine for each element of @var{x}. @seealso{acosh, sinh, tanh} @end deftypefn */) @@ -645,7 +645,7 @@ DEFUN (erf, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} erf (@var{z}) +@deftypefn {} {@var{v} =} erf (@var{z}) Compute the error function. The error function is defined as @@ -714,7 +714,7 @@ DEFUN (erfinv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} erfinv (@var{x}) +@deftypefn {} {@var{y} =} erfinv (@var{x}) Compute the inverse error function. The inverse error function is defined such that @@ -756,7 +756,7 @@ DEFUN (erfcinv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} erfcinv (@var{x}) +@deftypefn {} {@var{y} =} erfcinv (@var{x}) Compute the inverse complementary error function. The inverse complementary error function is defined such that @@ -798,7 +798,7 @@ DEFUN (erfc, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} erfc (@var{z}) +@deftypefn {} {@var{v} =} erfc (@var{z}) Compute the complementary error function. The complementary error function is defined as @@ -828,7 +828,7 @@ DEFUN (erfcx, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} erfcx (@var{z}) +@deftypefn {} {@var{v} =} erfcx (@var{z}) Compute the scaled complementary error function. The scaled complementary error function is defined as @@ -870,7 +870,7 @@ DEFUN (erfi, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} erfi (@var{z}) +@deftypefn {} {@var{v} =} erfi (@var{z}) Compute the imaginary error function. The imaginary error function is defined as @@ -907,7 +907,7 @@ DEFUN (dawson, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} dawson (@var{z}) +@deftypefn {} {@var{v} =} dawson (@var{z}) Compute the Dawson (scaled imaginary error) function. The Dawson function is defined as @@ -946,7 +946,7 @@ DEFUN (exp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} exp (@var{x}) +@deftypefn {} {@var{y} =} exp (@var{x}) Compute @tex $e^{x}$ @@ -983,7 +983,7 @@ DEFUN (expm1, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} expm1 (@var{x}) +@deftypefn {} {@var{y} =} expm1 (@var{x}) Compute @tex $ e^{x} - 1 $ @@ -1050,7 +1050,7 @@ DEFUN (fix, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} fix (@var{x}) +@deftypefn {} {@var{y} =} fix (@var{x}) Truncate fractional portion of @var{x} and return the integer portion. This is equivalent to rounding towards zero. If @var{x} is complex, return @@ -1084,7 +1084,7 @@ DEFUN (floor, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} floor (@var{x}) +@deftypefn {} {@var{y} =} floor (@var{x}) Return the largest integer not greater than @var{x}. This is equivalent to rounding towards negative infinity. If @var{x} is @@ -1118,7 +1118,7 @@ DEFUN (gamma, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} gamma (@var{z}) +@deftypefn {} {@var{v} =} gamma (@var{z}) Compute the Gamma function. The Gamma function is defined as @@ -1187,7 +1187,7 @@ DEFUN (imag, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} imag (@var{z}) +@deftypefn {} {@var{y} =} imag (@var{z}) Return the imaginary part of @var{z} as a real number. @seealso{real, conj} @end deftypefn */) @@ -1668,9 +1668,12 @@ DEFUN (lgamma, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} gammaln (@var{x}) -@deftypefnx {} {} lgamma (@var{x}) +@deftypefn {} {@var{y} =} gammaln (@var{x}) +@deftypefnx {} {@var{y} =} lgamma (@var{x}) Return the natural logarithm of the gamma function of @var{x}. + +Programming Note: @code{lgamma} is an alias for @code{gammaln} and either name +can be used in Octave. @seealso{gamma, gammainc} @end deftypefn */) { @@ -1711,7 +1714,7 @@ DEFUN (log, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} log (@var{x}) +@deftypefn {} {@var{y} =} log (@var{x}) Compute the natural logarithm, @tex $\ln{(x)},$ @@ -1745,7 +1748,7 @@ DEFUN (log10, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} log10 (@var{x}) +@deftypefn {} {@var{y} =} log10 (@var{x}) Compute the base-10 logarithm of each element of @var{x}. @seealso{log, log2, logspace, exp} @end deftypefn */) @@ -1767,7 +1770,7 @@ DEFUN (log1p, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} log1p (@var{x}) +@deftypefn {} {@var{y} =} log1p (@var{x}) Compute @tex $\ln{(1 + x)}$ @@ -1802,7 +1805,7 @@ DEFUN (real, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} real (@var{z}) +@deftypefn {} {@var{x} =} real (@var{z}) Return the real part of @var{z}. @seealso{imag, conj} @end deftypefn */) @@ -1830,7 +1833,7 @@ DEFUN (round, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} round (@var{x}) +@deftypefn {} {@var{y} =} round (@var{x}) Return the integer nearest to @var{x}. If @var{x} is complex, return @@ -1875,7 +1878,7 @@ DEFUN (roundb, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} roundb (@var{x}) +@deftypefn {} {@var{y} =} roundb (@var{x}) Return the integer nearest to @var{x}. If there are two nearest integers, return the even one (banker's rounding). @@ -1915,7 +1918,7 @@ DEFUN (sign, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sign (@var{x}) +@deftypefn {} {@var{y} =} sign (@var{x}) Compute the @dfn{signum} function. This is defined as @@ -1967,7 +1970,7 @@ DEFUNX ("signbit", Fsignbit, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} signbit (@var{x}) +@deftypefn {} {@var{y} =} signbit (@var{x}) Return logical true if the value of @var{x} has its sign bit set and false otherwise. @@ -2006,7 +2009,7 @@ DEFUN (sin, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sin (@var{x}) +@deftypefn {} {@var{y} =} sin (@var{x}) Compute the sine for each element of @var{x} in radians. @seealso{asin, sind, sinh} @end deftypefn */) @@ -2038,7 +2041,7 @@ DEFUN (sinh, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sinh (@var{x}) +@deftypefn {} {@var{y} =} sinh (@var{x}) Compute the hyperbolic sine for each element of @var{x}. @seealso{asinh, cosh, tanh} @end deftypefn */) @@ -2066,7 +2069,7 @@ DEFUN (sqrt, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sqrt (@var{x}) +@deftypefn {} {@var{y} =} sqrt (@var{x}) Compute the square root of each element of @var{x}. If @var{x} is negative, a complex result is returned. @@ -2102,7 +2105,7 @@ DEFUN (tan, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} tan (@var{z}) +@deftypefn {} {@var{y} =} tan (@var{z}) Compute the tangent for each element of @var{x} in radians. @seealso{atan, tand, tanh} @end deftypefn */) @@ -2134,7 +2137,7 @@ DEFUN (tanh, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} tanh (@var{x}) +@deftypefn {} {@var{y} =} tanh (@var{x}) Compute hyperbolic tangent for each element of @var{x}. @seealso{atanh, sinh, cosh} @end deftypefn */) @@ -2162,8 +2165,8 @@ DEFUNX ("tolower", Ftolower, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} tolower (@var{s}) -@deftypefnx {} {} lower (@var{s}) +@deftypefn {} {@var{y} =} tolower (@var{s}) +@deftypefnx {} {@var{y} =} lower (@var{s}) Return a copy of the string or cell string @var{s}, with each uppercase character replaced by the corresponding lowercase one; non-alphabetic characters are left unchanged. @@ -2176,6 +2179,10 @@ @result{} "mixed case 123" @end group @end example + +Programming Note: @code{lower} is an alias for @code{tolower} and either name +can be used in Octave. + @seealso{toupper} @end deftypefn */) { @@ -2230,8 +2237,8 @@ DEFUNX ("toupper", Ftoupper, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} toupper (@var{s}) -@deftypefnx {} {} upper (@var{s}) +@deftypefn {} {@var{y} =} toupper (@var{s}) +@deftypefnx {} {@var{y} =} upper (@var{s}) Return a copy of the string or cell string @var{s}, with each lowercase character replaced by the corresponding uppercase one; non-alphabetic characters are left unchanged. @@ -2244,6 +2251,10 @@ @result{} "MIXED CASE 123" @end group @end example + +Programming Note: @code{upper} is an alias for @code{toupper} and either name +can be used in Octave. + @seealso{tolower} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/max.cc --- a/libinterp/corefcn/max.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/max.cc Mon Apr 04 10:31:48 2022 -0700 @@ -440,10 +440,10 @@ DEFUN (min, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} min (@var{x}) -@deftypefnx {} {} min (@var{x}, [], @var{dim}) -@deftypefnx {} {[@var{w}, @var{iw}] =} min (@var{x}) -@deftypefnx {} {} min (@var{x}, @var{y}) +@deftypefn {} {@var{m} =} min (@var{x}) +@deftypefnx {} {@var{m} =} min (@var{x}, [], @var{dim}) +@deftypefnx {} {[@var{m}, @var{im}] =} min (@var{x}) +@deftypefnx {} {@var{m} =} min (@var{x}, @var{y}) Find minimum values in the array @var{x}. For a vector argument, return the minimum value. For a matrix argument, @@ -662,10 +662,10 @@ DEFUN (max, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} max (@var{x}) -@deftypefnx {} {} max (@var{x}, [], @var{dim}) -@deftypefnx {} {[@var{w}, @var{iw}] =} max (@var{x}) -@deftypefnx {} {} max (@var{x}, @var{y}) +@deftypefn {} {@var{m} =} max (@var{x}) +@deftypefnx {} {@var{m} =} max (@var{x}, [], @var{dim}) +@deftypefnx {} {[@var{m}, @var{im}] =} max (@var{x}) +@deftypefnx {} {@var{m} =} max (@var{x}, @var{y}) Find maximum values in the array @var{x}. For a vector argument, return the maximum value. For a matrix argument, @@ -993,9 +993,9 @@ DEFUN (cummin, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} cummin (@var{x}) -@deftypefnx {} {} cummin (@var{x}, @var{dim}) -@deftypefnx {} {[@var{w}, @var{iw}] =} cummin (@var{x}) +@deftypefn {} {@var{M} =} cummin (@var{x}) +@deftypefnx {} {@var{M} =} cummin (@var{x}, @var{dim}) +@deftypefnx {} {[@var{M}, @var{IM}] =} cummin (@var{x}) Return the cumulative minimum values along dimension @var{dim}. If @var{dim} is unspecified it defaults to column-wise operation. For @@ -1013,10 +1013,10 @@ @example @group -[w, iw] = cummin ([5 4 6 2 3 1]) +[M, IM] = cummin ([5 4 6 2 3 1]) @result{} -w = 5 4 4 2 2 1 -iw = 1 2 2 4 4 6 +M = 5 4 4 2 2 1 +IM = 1 2 2 4 4 6 @end group @end example @@ -1048,9 +1048,9 @@ DEFUN (cummax, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} cummax (@var{x}) -@deftypefnx {} {} cummax (@var{x}, @var{dim}) -@deftypefnx {} {[@var{w}, @var{iw}] =} cummax (@dots{}) +@deftypefn {} {@var{M} =} cummax (@var{x}) +@deftypefnx {} {@var{M} =} cummax (@var{x}, @var{dim}) +@deftypefnx {} {[@var{M}, @var{IM}] =} cummax (@dots{}) Return the cumulative maximum values along dimension @var{dim}. If @var{dim} is unspecified it defaults to column-wise operation. For @@ -1070,8 +1070,8 @@ @group [w, iw] = cummax ([1 3 2 6 4 5]) @result{} -w = 1 3 3 6 6 6 -iw = 1 2 2 4 4 4 +M = 1 3 3 6 6 6 +IM = 1 2 2 4 4 4 @end group @end example diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/nproc.cc --- a/libinterp/corefcn/nproc.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/nproc.cc Mon Apr 04 10:31:48 2022 -0700 @@ -36,8 +36,8 @@ DEFUN (nproc, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} nproc () -@deftypefnx {} {} nproc (@var{query}) +@deftypefn {} {@var{n} =} nproc () +@deftypefnx {} {@var{n} =} nproc (@var{query}) Return the current number of available processors. If called with the optional argument @var{query}, modify how processors diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/oct-hist.cc --- a/libinterp/corefcn/oct-hist.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/oct-hist.cc Mon Apr 04 10:31:48 2022 -0700 @@ -614,7 +614,6 @@ @end deftypefn */) { // FIXME: should this be limited to the top-level context? - if (args.length () > 2) print_usage (); @@ -629,8 +628,8 @@ doc: /* -*- texinfo -*- @deftypefn {} {} history @deftypefnx {} {} history @var{opt1} @dots{} -@deftypefnx {} {@var{h} =} history () -@deftypefnx {} {@var{h} =} history (@var{opt1}, @dots{}) +@deftypefnx {} {@var{H} =} history () +@deftypefnx {} {@var{H} =} history (@var{opt1}, @dots{}) If invoked with no arguments, @code{history} displays a list of commands that you have executed. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/pager.cc --- a/libinterp/corefcn/pager.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/pager.cc Mon Apr 04 10:31:48 2022 -0700 @@ -623,13 +623,14 @@ DEFUN (terminal_size, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} terminal_size () -Query or set the size of the terminal window. If called with no -arguments, return a two-element row vector containing the current size -of the terminal window in characters (rows and columns). If called with -a two-element vector of integer values, set the terminal size and return -the previous setting. Setting the size manually should not be needed -when using readline for command-line editing. +@deftypefn {} {[@var{rows}, @var{cols}] =} terminal_size () +@deftypefnx {} {} terminal_size ([@var{rows}, @var{cols}]) +Query or set the size of the terminal window. If called with no arguments, +return a two-element row vector containing the current size of the terminal +window in characters (rows and columns). If called with a two-element vector +of integer values, set the terminal size and return the previous setting. +Setting the size manually should not be needed when using readline for +command-line editing. @seealso{list_in_columns} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/pinv.cc --- a/libinterp/corefcn/pinv.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/pinv.cc Mon Apr 04 10:31:48 2022 -0700 @@ -42,9 +42,9 @@ DEFUN (pinv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} pinv (@var{x}) -@deftypefnx {} {} pinv (@var{x}, @var{tol}) -Return the @nospell{Moore-Penrose} pseudoinverse of @var{x}. +@deftypefn {} {@var{B} =} pinv (@var{A}) +@deftypefnx {} {@var{B} =} pinv (@var{A}, @var{tol}) +Return the @nospell{Moore-Penrose} pseudoinverse of @var{A}. Singular values less than @var{tol} are ignored. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/psi.cc --- a/libinterp/corefcn/psi.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/psi.cc Mon Apr 04 10:31:48 2022 -0700 @@ -39,8 +39,8 @@ DEFUN (psi, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} psi (@var{z}) -@deftypefnx {} {} psi (@var{k}, @var{z}) +@deftypefn {} {@var{y} =} psi (@var{z}) +@deftypefnx {} {@var{y} =} psi (@var{k}, @var{z}) Compute the psi (polygamma) function. The polygamma functions are the @var{k}th derivative of the logarithm diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/rand.cc --- a/libinterp/corefcn/rand.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/rand.cc Mon Apr 04 10:31:48 2022 -0700 @@ -357,17 +357,17 @@ DEFUN (rand, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} rand (@var{n}) -@deftypefnx {} {} rand (@var{m}, @var{n}, @dots{}) -@deftypefnx {} {} rand ([@var{m} @var{n} @dots{}]) +@deftypefn {} {@var{x} =} rand (@var{n}) +@deftypefnx {} {@var{x} =} rand (@var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{x} =} rand ([@var{m} @var{n} @dots{}]) +@deftypefnx {} {@var{x} =} rand (@dots{}, "single") +@deftypefnx {} {@var{x} =} rand (@dots{}, "double") @deftypefnx {} {@var{v} =} rand ("state") @deftypefnx {} {} rand ("state", @var{v}) @deftypefnx {} {} rand ("state", "reset") @deftypefnx {} {@var{v} =} rand ("seed") @deftypefnx {} {} rand ("seed", @var{v}) @deftypefnx {} {} rand ("seed", "reset") -@deftypefnx {} {} rand (@dots{}, "single") -@deftypefnx {} {} rand (@dots{}, "double") Return a matrix with random elements uniformly distributed on the interval (0, 1). @@ -550,17 +550,17 @@ DEFUN (randn, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} randn (@var{n}) -@deftypefnx {} {} randn (@var{m}, @var{n}, @dots{}) -@deftypefnx {} {} randn ([@var{m} @var{n} @dots{}]) +@deftypefn {} {@var{x} =} randn (@var{n}) +@deftypefnx {} {@var{x} =} randn (@var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{x} =} randn ([@var{m} @var{n} @dots{}]) +@deftypefnx {} {@var{x} =} randn (@dots{}, "single") +@deftypefnx {} {@var{x} =} randn (@dots{}, "double") @deftypefnx {} {@var{v} =} randn ("state") @deftypefnx {} {} randn ("state", @var{v}) @deftypefnx {} {} randn ("state", "reset") @deftypefnx {} {@var{v} =} randn ("seed") @deftypefnx {} {} randn ("seed", @var{v}) @deftypefnx {} {} randn ("seed", "reset") -@deftypefnx {} {} randn (@dots{}, "single") -@deftypefnx {} {} randn (@dots{}, "double") Return a matrix with normally distributed random elements having zero mean and variance one. @@ -617,17 +617,17 @@ DEFUN (rande, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} rande (@var{n}) -@deftypefnx {} {} rande (@var{m}, @var{n}, @dots{}) -@deftypefnx {} {} rande ([@var{m} @var{n} @dots{}]) +@deftypefn {} {@var{x} =} rande (@var{n}) +@deftypefnx {} {@var{x} =} rande (@var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{x} =} rande ([@var{m} @var{n} @dots{}]) +@deftypefnx {} {@var{x} =} rande (@dots{}, "single") +@deftypefnx {} {@var{x} =} rande (@dots{}, "double") @deftypefnx {} {@var{v} =} rande ("state") @deftypefnx {} {} rande ("state", @var{v}) @deftypefnx {} {} rande ("state", "reset") @deftypefnx {} {@var{v} =} rande ("seed") @deftypefnx {} {} rande ("seed", @var{v}) @deftypefnx {} {} rande ("seed", "reset") -@deftypefnx {} {} rande (@dots{}, "single") -@deftypefnx {} {} rande (@dots{}, "double") Return a matrix with exponentially distributed random elements. The arguments are handled the same as the arguments for @code{rand}. @@ -686,17 +686,17 @@ DEFUN (randg, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} randg (@var{a}, @var{n}) -@deftypefnx {} {} randg (@var{a}, @var{m}, @var{n}, @dots{}) -@deftypefnx {} {} randg (@var{a}, [@var{m} @var{n} @dots{}]) +@deftypefn {} {@var{x} =} randg (@var{a}, @var{n}) +@deftypefnx {} {@var{x} =} randg (@var{a}, @var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{x} =} randg (@var{a}, [@var{m} @var{n} @dots{}]) +@deftypefnx {} {@var{x} =} randg (@dots{}, "single") +@deftypefnx {} {@var{x} =} randg (@dots{}, "double") @deftypefnx {} {@var{v} =} randg ("state") @deftypefnx {} {} randg ("state", @var{v}) @deftypefnx {} {} randg ("state", "reset") @deftypefnx {} {@var{v} =} randg ("seed") @deftypefnx {} {} randg ("seed", @var{v}) @deftypefnx {} {} randg ("seed", "reset") -@deftypefnx {} {} randg (@dots{}, "single") -@deftypefnx {} {} randg (@dots{}, "double") Return a matrix with @code{gamma (@var{a},1)} distributed random elements. @@ -961,17 +961,17 @@ DEFUN (randp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} randp (@var{l}, @var{n}) -@deftypefnx {} {} randp (@var{l}, @var{m}, @var{n}, @dots{}) -@deftypefnx {} {} randp (@var{l}, [@var{m} @var{n} @dots{}]) +@deftypefn {} {@var{x} =} randp (@var{l}, @var{n}) +@deftypefnx {} {@var{x} =} randp (@var{l}, @var{m}, @var{n}, @dots{}) +@deftypefnx {} {@var{x} =} randp (@var{l}, [@var{m} @var{n} @dots{}]) +@deftypefnx {} {@var{x} =} randp (@dots{}, "single") +@deftypefnx {} {@var{x} =} randp (@dots{}, "double") @deftypefnx {} {@var{v} =} randp ("state") @deftypefnx {} {} randp ("state", @var{v}) @deftypefnx {} {} randp ("state", "reset") @deftypefnx {} {@var{v} =} randp ("seed") @deftypefnx {} {} randp ("seed", @var{v}) @deftypefnx {} {} randp ("seed", "reset") -@deftypefnx {} {} randp (@dots{}, "single") -@deftypefnx {} {} randp (@dots{}, "double") Return a matrix with Poisson distributed random elements with mean value parameter given by the first argument, @var{l}. @@ -1110,8 +1110,8 @@ DEFUN (randperm, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} randperm (@var{n}) -@deftypefnx {} {} randperm (@var{n}, @var{m}) +@deftypefn {} {@var{v} =} randperm (@var{n}) +@deftypefnx {} {@var{v} =} randperm (@var{n}, @var{m}) Return a row vector containing a random permutation of @code{1:@var{n}}. If @var{m} is supplied, return @var{m} unique entries, sampled without diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/settings.cc --- a/libinterp/corefcn/settings.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/settings.cc Mon Apr 04 10:31:48 2022 -0700 @@ -57,7 +57,9 @@ DEFMETHOD (__display_tokens__, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} __display_tokens__ () +@deftypefn {} {@var{val} =} __display_tokens__ () +@deftypefnx {} {@var{old_val} =} __display_tokens__ (@var{new_val}) +@deftypefnx {} {@var{old_val} =} __display_tokens__ (@var{new_val}, "local") Query or set the internal variable that determines whether Octave's lexer displays tokens as they are read. @seealso{__lexer_debug_flag__, __token_count__} @@ -70,7 +72,7 @@ DEFMETHOD (__token_count__, interp, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __token_count__ () +@deftypefn {} {@var{n} =} __token_count__ () Return the number of language tokens processed since Octave startup. @seealso{__lexer_debug_flag__, __display_tokens__} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/sighandlers.cc --- a/libinterp/corefcn/sighandlers.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/sighandlers.cc Mon Apr 04 10:31:48 2022 -0700 @@ -494,7 +494,7 @@ DEFUN (SIG, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} SIG () +@deftypefn {} {@var{S} =} SIG () Return a structure containing Unix signal names and their defined values. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/stream-euler.cc --- a/libinterp/corefcn/stream-euler.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/stream-euler.cc Mon Apr 04 10:31:48 2022 -0700 @@ -506,7 +506,7 @@ DEFUN (__streameuler2d__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __streameuler2d__ (@var{U}, @var{V}, @var{TX}, @var{TY}, @var{ZETA}, @var{XI}, @var{H}, @var{MAXNVERTS}) +@deftypefn {} {@var{output} =} __streameuler2d__ (@var{U}, @var{V}, @var{TX}, @var{TY}, @var{ZETA}, @var{XI}, @var{H}, @var{MAXNVERTS}) Calculates the streamline in a vector field @code{[@var{U}, @var{V}]} starting from a seed point at position @code{[@var{ZETA}, @var{XI}]}. The integrator used is Heun's Scheme. The step size can be controlled by @var{H}. The @@ -521,7 +521,7 @@ DEFUN (__streameuler3d__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __streameuler3d__ (@var{U}, @var{V}, @var{W}, @var{TX}, @var{TY}, @var{TZ}, @var{ZETA}, @var{XI}, @var{RHO}, @var{H}, @var{MAXNVERTS}) +@deftypefn {} {@var{output} =} __streameuler3d__ (@var{U}, @var{V}, @var{W}, @var{TX}, @var{TY}, @var{TZ}, @var{ZETA}, @var{XI}, @var{RHO}, @var{H}, @var{MAXNVERTS}) Calculates the streamline in a vector field @code{[@var{U}, @var{V}, @var{W}]} starting from a seed point at position @code{[@var{ZETA}, @var{XI}, @var{RHO}]}. The integrator used is Heun's diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/strfns.cc --- a/libinterp/corefcn/strfns.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/strfns.cc Mon Apr 04 10:31:48 2022 -0700 @@ -52,10 +52,10 @@ DEFUN (char, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} char (@var{x}) -@deftypefnx {} {} char (@var{x}, @dots{}) -@deftypefnx {} {} char (@var{s1}, @var{s2}, @dots{}) -@deftypefnx {} {} char (@var{cell_array}) +@deftypefn {} {@var{C} =} char (@var{A}) +@deftypefnx {} {@var{C} =} char (@var{A}, @dots{}) +@deftypefnx {} {@var{C} =} char (@var{str1}, @var{str2}, @dots{}) +@deftypefnx {} {@var{C} =} char (@var{cell_array}) Create a string array from one or more numeric matrices, character matrices, or cell arrays. @@ -177,10 +177,10 @@ DEFUN (strvcat, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} strvcat (@var{x}) -@deftypefnx {} {} strvcat (@var{x}, @dots{}) -@deftypefnx {} {} strvcat (@var{s1}, @var{s2}, @dots{}) -@deftypefnx {} {} strvcat (@var{cell_array}) +@deftypefn {} {@var{C} =} strvcat (@var{A}) +@deftypefnx {} {@var{C} =} strvcat (@var{A}, @dots{}) +@deftypefnx {} {@var{C} =} strvcat (@var{str1}, @var{str2}, @dots{}) +@deftypefnx {} {@var{C} =} strvcat (@var{cell_array}) Create a character array from one or more numeric matrices, character matrices, or cell arrays. @@ -541,11 +541,11 @@ DEFUN (strcmp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} strcmp (@var{s1}, @var{s2}) -Return 1 if the character strings @var{s1} and @var{s2} are the same, +@deftypefn {} {@var{tf} =} strcmp (@var{str1}, @var{str2}) +Return 1 if the character strings @var{str1} and @var{str2} are the same, and 0 otherwise. -If either @var{s1} or @var{s2} is a cell array of strings, then an array +If either @var{str1} or @var{str2} is a cell array of strings, then an array of the same size is returned, containing the values described above for every member of the cell array. The other argument may also be a cell array of strings (of the same size or with only one element), char matrix @@ -615,8 +615,8 @@ DEFUN (strncmp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} strncmp (@var{s1}, @var{s2}, @var{n}) -Return 1 if the first @var{n} characters of strings @var{s1} and @var{s2} +@deftypefn {} {@var{tf} =} strncmp (@var{str1}, @var{str2}, @var{n}) +Return 1 if the first @var{n} characters of strings @var{str1} and @var{str2} are the same, and 0 otherwise. @example @@ -626,7 +626,7 @@ @end group @end example -If either @var{s1} or @var{s2} is a cell array of strings, then an array +If either @var{str1} or @var{str2} is a cell array of strings, then an array of the same size is returned, containing the values described above for every member of the cell array. The other argument may also be a cell array of strings (of the same size or with only one element), char matrix @@ -677,11 +677,11 @@ DEFUNX ("strcmpi", Fstrcmpi, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} strcmpi (@var{s1}, @var{s2}) -Return 1 if the character strings @var{s1} and @var{s2} are the same, +@deftypefn {} {@var{tf} =} strcmpi (@var{str1}, @var{str2}) +Return 1 if the character strings @var{str1} and @var{str2} are the same, disregarding case of alphabetic characters, and 0 otherwise. -If either @var{s1} or @var{s2} is a cell array of strings, then an array +If either @var{str1} or @var{str2} is a cell array of strings, then an array of the same size is returned, containing the values described above for every member of the cell array. The other argument may also be a cell array of strings (of the same size or with only one element), char matrix @@ -708,11 +708,11 @@ DEFUNX ("strncmpi", Fstrncmpi, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} strncmpi (@var{s1}, @var{s2}, @var{n}) +@deftypefn {} {@var{tf} =} strncmpi (@var{str1}, @var{str2}, @var{n}) Return 1 if the first @var{n} character of @var{s1} and @var{s2} are the same, disregarding case of alphabetic characters, and 0 otherwise. -If either @var{s1} or @var{s2} is a cell array of strings, then an array +If either @var{str1} or @var{str2} is a cell array of strings, then an array of the same size is returned, containing the values described above for every member of the cell array. The other argument may also be a cell array of strings (of the same size or with only one element), char matrix @@ -747,7 +747,7 @@ DEFUN (str2double, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} str2double (@var{s}) +@deftypefn {} {@var{d} =} str2double (@var{str}) Convert a string to a real or complex number. The string must be in one of the following formats where a and b are real @@ -772,12 +772,12 @@ more digits. The special input values @code{Inf}, @code{NaN}, and @code{NA} are also accepted. -@var{s} may be a character string, character matrix, or cell array. For +@var{str} may be a character string, character matrix, or cell array. For character arrays the conversion is repeated for every row, and a double or complex array is returned. Empty rows in @var{s} are deleted and not returned in the numeric array. For cell arrays each character string element is processed and a double or complex array of the same dimensions as -@var{s} is returned. +@var{str} is returned. For unconvertible scalar or character string input @code{str2double} returns a NaN@. Similarly, for character array input @code{str2double} returns a @@ -787,8 +787,8 @@ cell array are not strings and the conversion will fail for these elements and return NaN. -@code{str2double} can replace @code{str2num}, and it avoids the security -risk of using @code{eval} on unknown data. +Programming Note: @code{str2double} can replace @code{str2num}, is more +efficient, and avoids the security risk of using @code{eval} on unknown data. @seealso{str2num} @end deftypefn */) { @@ -1142,7 +1142,7 @@ DEFUN (newline, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} newline +@deftypefn {} {@var{c} =} newline Return the character corresponding to a newline. This is equivalent to @qcode{"@backslashchar{}n"}. @@ -1180,7 +1180,7 @@ DEFUN (list_in_columns, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} list_in_columns (@var{arg}, @var{width}, @var{prefix}) +@deftypefn {} {@var{str} =} list_in_columns (@var{arg}, @var{width}, @var{prefix}) Return a string containing the elements of @var{arg} listed in columns with an overall maximum width of @var{width} and optional prefix @var{prefix}. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/symtab.cc --- a/libinterp/corefcn/symtab.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/symtab.cc Mon Apr 04 10:31:48 2022 -0700 @@ -724,9 +724,9 @@ DEFMETHOD (__dump_symtab_info__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __dump_symtab_info__ () -@deftypefnx {} {} __dump_symtab_info__ (@var{function}) -Undocumented internal function. +@deftypefn {} {@var{S} =} __dump_symtab_info__ () +@deftypefnx {} {@var{S} =} __dump_symtab_info__ (@var{function}) +Return a structure with information from the symbol table. @end deftypefn */) { int nargin = args.length (); @@ -753,7 +753,7 @@ DEFMETHOD (__get_cmdline_fcn_txt__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __get_cmdline_fcn_txt__ (@var{name}) +@deftypefn {} {@var{str} =} __get_cmdline_fcn_txt__ (@var{name}) Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/syscalls.cc --- a/libinterp/corefcn/syscalls.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/syscalls.cc Mon Apr 04 10:31:48 2022 -0700 @@ -930,7 +930,7 @@ DEFUNX ("S_ISREG", FS_ISREG, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISREG (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISREG (@var{mode}) Return true if @var{mode} corresponds to a regular file. The value of @var{mode} is assumed to be returned from a call to @@ -948,7 +948,7 @@ DEFUNX ("S_ISDIR", FS_ISDIR, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISDIR (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISDIR (@var{mode}) Return true if @var{mode} corresponds to a directory. The value of @var{mode} is assumed to be returned from a call to @@ -966,7 +966,7 @@ DEFUNX ("S_ISCHR", FS_ISCHR, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISCHR (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISCHR (@var{mode}) Return true if @var{mode} corresponds to a character device. The value of @var{mode} is assumed to be returned from a call to @@ -984,7 +984,7 @@ DEFUNX ("S_ISBLK", FS_ISBLK, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISBLK (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISBLK (@var{mode}) Return true if @var{mode} corresponds to a block device. The value of @var{mode} is assumed to be returned from a call to @@ -1002,7 +1002,7 @@ DEFUNX ("S_ISFIFO", FS_ISFIFO, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISFIFO (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISFIFO (@var{mode}) Return true if @var{mode} corresponds to a fifo. The value of @var{mode} is assumed to be returned from a call to @@ -1020,7 +1020,7 @@ DEFUNX ("S_ISLNK", FS_ISLNK, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISLNK (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISLNK (@var{mode}) Return true if @var{mode} corresponds to a symbolic link. The value of @var{mode} is assumed to be returned from a call to @@ -1038,7 +1038,7 @@ DEFUNX ("S_ISSOCK", FS_ISSOCK, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} S_ISSOCK (@var{mode}) +@deftypefn {} {@var{tf} =} S_ISSOCK (@var{mode}) Return true if @var{mode} corresponds to a socket. The value of @var{mode} is assumed to be returned from a call to @@ -1056,7 +1056,7 @@ DEFUN (gethostname, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} gethostname () +@deftypefn {} {@var{name} =} gethostname () Return the hostname of the system where Octave is running. @end deftypefn */) { @@ -1249,7 +1249,7 @@ DEFUNX ("WIFEXITED", FWIFEXITED, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WIFEXITED (@var{status}) +@deftypefn {} {@var{tf} =} WIFEXITED (@var{status}) Given @var{status} from a call to @code{waitpid}, return true if the child terminated normally. @seealso{waitpid, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, @@ -1266,7 +1266,7 @@ DEFUNX ("WEXITSTATUS", FWEXITSTATUS, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WEXITSTATUS (@var{status}) +@deftypefn {} {@var{tf} =} WEXITSTATUS (@var{status}) Given @var{status} from a call to @code{waitpid}, return the exit status of the child. @@ -1285,7 +1285,7 @@ DEFUNX ("WIFSIGNALED", FWIFSIGNALED, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WIFSIGNALED (@var{status}) +@deftypefn {} {@var{tf} =} WIFSIGNALED (@var{status}) Given @var{status} from a call to @code{waitpid}, return true if the child process was terminated by a signal. @seealso{waitpid, WIFEXITED, WEXITSTATUS, WTERMSIG, WCOREDUMP, WIFSTOPPED, @@ -1302,7 +1302,7 @@ DEFUNX ("WTERMSIG", FWTERMSIG, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WTERMSIG (@var{status}) +@deftypefn {} {@var{tf} =} WTERMSIG (@var{status}) Given @var{status} from a call to @code{waitpid}, return the number of the signal that caused the child process to terminate. @@ -1321,7 +1321,7 @@ DEFUNX ("WCOREDUMP", FWCOREDUMP, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WCOREDUMP (@var{status}) +@deftypefn {} {@var{tf} =} WCOREDUMP (@var{status}) Given @var{status} from a call to @code{waitpid}, return true if the child produced a core dump. @@ -1342,7 +1342,7 @@ DEFUNX ("WIFSTOPPED", FWIFSTOPPED, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WIFSTOPPED (@var{status}) +@deftypefn {} {@var{tf} =} WIFSTOPPED (@var{status}) Given @var{status} from a call to @code{waitpid}, return true if the child process was stopped by delivery of a signal. @@ -1362,7 +1362,7 @@ DEFUNX ("WSTOPSIG", FWSTOPSIG, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WSTOPSIG (@var{status}) +@deftypefn {} {@var{tf} =} WSTOPSIG (@var{status}) Given @var{status} from a call to @code{waitpid}, return the number of the signal which caused the child to stop. @@ -1381,7 +1381,7 @@ DEFUNX ("WIFCONTINUED", FWIFCONTINUED, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WIFCONTINUED (@var{status}) +@deftypefn {} {@var{tf} =} WIFCONTINUED (@var{status}) Given @var{status} from a call to @code{waitpid}, return true if the child process was resumed by delivery of @code{SIGCONT}. @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, @@ -1430,7 +1430,7 @@ DEFUNX ("F_DUPFD", FF_DUPFD, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} F_DUPFD () +@deftypefn {} {@var{v} =} F_DUPFD () Return the numerical value to pass to @code{fcntl} to return a duplicate file descriptor. @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL} @@ -1446,7 +1446,7 @@ DEFUNX ("F_GETFD", FF_GETFD, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} F_GETFD () +@deftypefn {} {@var{v} =} F_GETFD () Return the numerical value to pass to @code{fcntl} to return the file descriptor flags. @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL} @@ -1462,7 +1462,7 @@ DEFUNX ("F_GETFL", FF_GETFL, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} F_GETFL () +@deftypefn {} {@var{v} =} F_GETFL () Return the numerical value to pass to @code{fcntl} to return the file status flags. @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL} @@ -1478,7 +1478,7 @@ DEFUNX ("F_SETFD", FF_SETFD, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} F_SETFD () +@deftypefn {} {@var{v} =} F_SETFD () Return the numerical value to pass to @code{fcntl} to set the file descriptor flags. @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFL} @@ -1494,7 +1494,7 @@ DEFUNX ("F_SETFL", FF_SETFL, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} F_SETFL () +@deftypefn {} {@var{v} =} F_SETFL () Return the numerical value to pass to @code{fcntl} to set the file status flags. @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFD} @@ -1510,7 +1510,7 @@ DEFUNX ("O_APPEND", FO_APPEND, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_APPEND () +@deftypefn {} {@var{v} =} O_APPEND () Return the numerical value of the @code{O_APPEND} macro. @code{O_APPEND} is file status flag that may be returned by @code{fcntl} @@ -1530,7 +1530,7 @@ DEFUNX ("O_ASYNC", FO_ASYNC, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_ASYNC () +@deftypefn {} {@var{v} =} O_ASYNC () Return the numerical value of the @code{O_ASYNC} macro. @code{O_ASYNC} is the file status flag that may be returned by @@ -1549,7 +1549,7 @@ DEFUNX ("O_CREAT", FO_CREAT, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_CREAT () +@deftypefn {} {@var{v} =} O_CREAT () Return the numerical value of the @code{O_CREAT}. @code{O_CREAT} is the file status flag that may be returned by @@ -1569,7 +1569,7 @@ DEFUNX ("O_EXCL", FO_EXCL, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_EXCL () +@deftypefn {} {@var{v} =} O_EXCL () Return the numerical value of the @code{O_EXCL}. @code{O_EXCL} is the file status flag that may be returned by @@ -1588,7 +1588,7 @@ DEFUNX ("O_NONBLOCK", FO_NONBLOCK, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_NONBLOCK () +@deftypefn {} {@var{v} =} O_NONBLOCK () Return the numerical value of the @code{O_NONBLOCK}. @code{O_NONBLOCK} is the file status flag that may be returned by @@ -1608,7 +1608,7 @@ DEFUNX ("O_RDONLY", FO_RDONLY, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_RDONLY () +@deftypefn {} {@var{v} =} O_RDONLY () Return the numerical value of the @code{O_RDONLY}. @code{O_RDONLY} is the file status flag that may be returned by @@ -1627,7 +1627,7 @@ DEFUNX ("O_RDWR", FO_RDWR, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_RDWR () +@deftypefn {} {@var{v} =} O_RDWR () Return the numerical value of the @code{O_RDWR}. @code{O_RDWR} is the file status flag that may be returned by @@ -1647,7 +1647,7 @@ DEFUNX ("O_SYNC", FO_SYNC, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_SYNC () +@deftypefn {} {@var{v} =} O_SYNC () Return the numerical value of the @code{O_SYNC}. @code{O_SYNC} is the file status flag that may be returned by @@ -1666,7 +1666,7 @@ DEFUNX ("O_TRUNC", FO_TRUNC, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_TRUNC () +@deftypefn {} {@var{v} =} O_TRUNC () Return the numerical value of the @code{O_TRUNC}. @code{O_TRUNC} is the file status flag that may be returned by @@ -1686,7 +1686,7 @@ DEFUNX ("O_WRONLY", FO_WRONLY, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} O_WRONLY () +@deftypefn {} {@var{v} =} O_WRONLY () Return the numerical value of the @code{O_WRONLY}. @code{O_WRONLY} is the file status flag that may be returned by @@ -1705,7 +1705,7 @@ DEFUNX ("WNOHANG", FWNOHANG, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WNOHANG () +@deftypefn {} {@var{v} =} WNOHANG () Return the numerical value of the @code{WNOHANG} macro. @code{WNOHANG} is the option argument that may be passed to @@ -1719,7 +1719,7 @@ DEFUNX ("WUNTRACED", FWUNTRACED, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WUNTRACED () +@deftypefn {} {@var{v} =} WUNTRACED () Return the numerical value of the @code{WUNTRACED} macro. @code{WUNTRACED} is the option argument that may be passed to @@ -1733,7 +1733,7 @@ DEFUNX ("WCONTINUE", FWCONTINUE, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} WCONTINUE () +@deftypefn {} {@var{v} =} WCONTINUE () Return the numerical value of the @code{WCONTINUE} macro. @code{WCONTINUE} is the option argument that may be passed to diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/sysdep.cc --- a/libinterp/corefcn/sysdep.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/sysdep.cc Mon Apr 04 10:31:48 2022 -0700 @@ -191,8 +191,8 @@ DEFUN (__open_with_system_app__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __open_with_system_app__ (@var{file}) -Internal function. Returns 1 on successful system call and 0 otherwise. +@deftypefn {} {@var{status} =} __open_with_system_app__ (@var{file}) +Return 1 on successful system call and 0 otherwise. @end deftypefn */) { if (args.length () != 1) @@ -819,7 +819,7 @@ DEFUN (getenv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} getenv (@var{var}) +@deftypefn {} {@var{val} =} getenv ("@var{var}") Return the value of the environment variable @var{var}. For example, @@ -847,13 +847,16 @@ DEFUN (setenv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} setenv (@var{var}, @var{value}) +@deftypefn {} {} setenv ("@var{var}", @var{value}) @deftypefnx {} {} setenv (@var{var}) @deftypefnx {} {} putenv (@dots{}) Set the value of the environment variable @var{var} to @var{value}. If no @var{value} is specified then the variable will be assigned the null string. + +Programming Note: @code{putenv} is an alias for @code{setenv} and can be used +interchangeably. @seealso{unsetenv, getenv} @end deftypefn */) { @@ -1209,29 +1212,31 @@ DEFMETHOD (kbhit, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} kbhit () -@deftypefnx {} {} kbhit (1) +@deftypefn {} {@var{c} =} kbhit () +@deftypefnx {} {@var{c} =} kbhit (1) Read a single keystroke from the keyboard. -If called with an argument, don't wait for a keypress. +If called with an argument (typically 1), don't wait for a keypress and +immediately return the next keystroke in the keyboard input buffer or an empty +string ("") if no keystroke is available. For example, @example -x = kbhit (); +c = kbhit (); @end example @noindent -will set @var{x} to the next character typed at the keyboard as soon as -it is typed. +will set @var{c} to the next character typed at the keyboard as soon as it is +typed. @example -x = kbhit (1); +c = kbhit (1); @end example @noindent -is identical to the above example, but doesn't wait for a keypress, -returning the empty string if no key is available. +is identical to the above example, but doesn't wait for a keypress, returning +the empty string if no key is available. @seealso{input, pause} @end deftypefn */) { @@ -1272,8 +1277,8 @@ @end group @end example -The following example prints a message and then waits 5 seconds before -clearing the screen. +The following example prints a message and then waits 5 seconds before clearing +the screen. @example @group @@ -1381,7 +1386,7 @@ DEFUN (native_float_format, , , doc: /* -*- texinfo -*- -@deftypefn {} {} native_float_format () +@deftypefn {} {@var{fmtstr} =} native_float_format () Return the native floating point format as a string. @end deftypefn */) { @@ -1396,8 +1401,8 @@ DEFUN (tilde_expand, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} tilde_expand (@var{string}) -@deftypefnx {} {} tilde_expand (@var{cellstr}) +@deftypefn {} {@var{newstr} =} tilde_expand (@var{string}) +@deftypefnx {} {@var{newcstr} =} tilde_expand (@var{cellstr}) Perform tilde expansion on @var{string}. If @var{string} begins with a tilde character, (@samp{~}), all of the @@ -1469,7 +1474,7 @@ DEFUN (__blas_version__, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __blas_version__ () +@deftypefn {} {@var{verstr} =} __blas_version__ () Undocumented internal function. @end deftypefn */) { @@ -1478,7 +1483,7 @@ DEFUN (__lapack_version__, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __lapack_version__ () +@deftypefn {} {@var{verstr} =} __lapack_version__ () Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/time.cc --- a/libinterp/corefcn/time.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/time.cc Mon Apr 04 10:31:48 2022 -0700 @@ -293,7 +293,7 @@ DEFUN (strftime, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} strftime (@var{fmt}, @var{tm_struct}) +@deftypefn {} {@var{str} =} strftime (@var{fmt}, @var{tm_struct}) Format the time structure @var{tm_struct} in a flexible way using the format string @var{fmt} that contains @samp{%} substitutions similar to those in @code{printf}. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/toplev.cc --- a/libinterp/corefcn/toplev.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/toplev.cc Mon Apr 04 10:31:48 2022 -0700 @@ -341,8 +341,8 @@ DEFUN (__octave_config_info__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __octave_config_info__ () -@deftypefnx {} {} __octave_config_info__ (@var{option}) +@deftypefn {} {@var{S} =} __octave_config_info__ () +@deftypefnx {} {@var{S} =} __octave_config_info__ (@var{option}) Return a structure containing configuration and installation information for Octave. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/utils.cc --- a/libinterp/corefcn/utils.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/utils.cc Mon Apr 04 10:31:48 2022 -0700 @@ -615,8 +615,8 @@ DEFUN (file_in_path, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} file_in_path (@var{path}, @var{file}) -@deftypefnx {} {} file_in_path (@var{path}, @var{file}, "all") +@deftypefn {} {@var{fname} =} file_in_path (@var{path}, @var{file}) +@deftypefnx {} {@var{fname} =} file_in_path (@var{path}, @var{file}, "all") Return the absolute name of @var{file} if it can be found in @var{path}. The value of @var{path} should be a colon-separated list of directories in @@ -926,7 +926,7 @@ DEFUN (do_string_escapes, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} do_string_escapes (@var{string}) +@deftypefn {} {@var{newstr} =} do_string_escapes (@var{string}) Convert escape sequences in @var{string} to the characters they represent. Escape sequences begin with a leading backslash @@ -1039,13 +1039,13 @@ DEFUN (undo_string_escapes, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} undo_string_escapes (@var{s}) -Convert special characters in strings back to their escaped forms. +@deftypefn {} {@var{newstr} =} undo_string_escapes (@var{string}) +Convert special characters in @var{string} back to their escaped forms. For example, the expression @example -bell = "\a"; +@var{bell} = "\a"; @end example @noindent @@ -1071,7 +1071,7 @@ if (args.length () != 1) print_usage (); - std::string str = args(0).xstring_value ("undo_string_escapes: S argument must be a string"); + std::string str = args(0).xstring_value ("undo_string_escapes: STRING argument must be a string"); return ovl (undo_string_escapes (str)); } @@ -1142,9 +1142,8 @@ DEFUN (make_absolute_filename, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} make_absolute_filename (@var{file}) -Return the full name of @var{file} beginning from the root of the file -system. +@deftypefn {} {@var{abs_fname} =} make_absolute_filename (@var{file}) +Return the full name of @var{file} beginning from the root of the file system. No check is done for the existence of @var{file}. No tilde expansion of @var{file} is performed. @@ -1289,7 +1288,7 @@ DEFUN (errno_list, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} errno_list () +@deftypefn {} {@var{S} =} errno_list () Return a structure containing the system-dependent errno values. @seealso{errno} @end deftypefn */) diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/corefcn/variables.cc --- a/libinterp/corefcn/variables.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/corefcn/variables.cc Mon Apr 04 10:31:48 2022 -0700 @@ -905,8 +905,8 @@ DEFMETHOD (mislocked, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} mislocked () -@deftypefnx {} {} mislocked (@var{fcn}) +@deftypefn {} {@var{tf} =} mislocked () +@deftypefnx {} {@var{tf} =} mislocked (@var{fcn}) Return true if the named function @var{fcn} is locked in memory. If no function is named then return true if the current function is locked. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/dldfcn/__fltk_uigetfile__.cc --- a/libinterp/dldfcn/__fltk_uigetfile__.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/dldfcn/__fltk_uigetfile__.cc Mon Apr 04 10:31:48 2022 -0700 @@ -58,7 +58,7 @@ DEFUN_DLD (__fltk_uigetfile__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __fltk_uigetfile__ (@dots{}) +@deftypefn {} {[@var{fname}, @var{fpath}, @var{fltidx}] =} __fltk_uigetfile__ (@dots{}) Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/dldfcn/audiodevinfo.cc --- a/libinterp/dldfcn/audiodevinfo.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/dldfcn/audiodevinfo.cc Mon Apr 04 10:31:48 2022 -0700 @@ -2162,7 +2162,7 @@ DEFUN_DLD (__recorder_isrecording__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __recorder_isrecording__ (@var{recorder}) +@deftypefn {} {@var{tf} =} __recorder_isrecording__ (@var{recorder}) Undocumented internal function. @end deftypefn */) { @@ -2575,7 +2575,7 @@ DEFUN_DLD (__player_isplaying__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __player_isplaying__ (@var{player}) +@deftypefn {} {@var{tf} =} __player_isplaying__ (@var{player}) Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/dldfcn/audioread.cc --- a/libinterp/dldfcn/audioread.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/dldfcn/audioread.cc Mon Apr 04 10:31:48 2022 -0700 @@ -465,8 +465,9 @@ offset += chunk_size; } - // FIXME: shouldn't we return something to indicate whether the file - // was written successfully? + // FIXME: Shouldn't we return something to indicate whether the file + // was written successfully? On the other hand, Matlab doesn't + // return anything. return ovl (); #else @@ -780,6 +781,8 @@ } } + return octave_value_list (); + #else octave_unused_parameter (args); @@ -788,8 +791,6 @@ "getting sound formats through libsndfile"); #endif - - return octave_value_list (); } OCTAVE_NAMESPACE_END diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/dldfcn/fftw.cc --- a/libinterp/dldfcn/fftw.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/dldfcn/fftw.cc Mon Apr 04 10:31:48 2022 -0700 @@ -49,8 +49,8 @@ @deftypefnx {} {} fftw ("planner", @var{method}) @deftypefnx {} {@var{wisdom} =} fftw ("dwisdom") @deftypefnx {} {} fftw ("dwisdom", @var{wisdom}) +@deftypefnx {} {@var{nthreads} =} fftw ("threads") @deftypefnx {} {} fftw ("threads", @var{nthreads}) -@deftypefnx {} {@var{nthreads} =} fftw ("threads") Manage @sc{fftw} wisdom data. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-bool-mat.cc --- a/libinterp/octave-value/ov-bool-mat.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-bool-mat.cc Mon Apr 04 10:31:48 2022 -0700 @@ -587,15 +587,14 @@ DEFUN (logical, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} logical (@var{x}) +@deftypefn {} {@var{TF} =} logical (@var{x}) Convert the numeric object @var{x} to logical type. Any nonzero values will be converted to true (1) while zero values will be -converted to false (0). The non-numeric value NaN cannot be converted and -will produce an error. +converted to false (0). The non-numeric value NaN cannot be converted and will +produce an error. -Compatibility Note: Octave accepts complex values as input, whereas -@sc{matlab} issues an error. +Compatibility Note: Octave accepts complex values as input, whereas @sc{matlab} issues an error. @seealso{double, single, char} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-cell.cc --- a/libinterp/octave-value/ov-cell.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-cell.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1237,10 +1237,10 @@ DEFUN (cell, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cell (@var{n}) -@deftypefnx {} {} cell (@var{m}, @var{n}) -@deftypefnx {} {} cell (@var{m}, @var{n}, @var{k}, @dots{}) -@deftypefnx {} {} cell ([@var{m} @var{n} @dots{}]) +@deftypefn {} {@var{C} =} cell (@var{n}) +@deftypefnx {} {@var{C} =} cell (@var{m}, @var{n}) +@deftypefnx {} {@var{C} =} cell (@var{m}, @var{n}, @var{k}, @dots{}) +@deftypefnx {} {@var{C} =} cell ([@var{m} @var{n} @dots{}]) Create a new cell array object. If invoked with a single scalar integer argument, return a square diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-class.cc --- a/libinterp/octave-value/ov-class.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-class.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1727,13 +1727,13 @@ DEFMETHOD (class, interp, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{classname} =} class (@var{obj}) -@deftypefnx {} {} class (@var{s}, @var{id}) -@deftypefnx {} {} class (@var{s}, @var{id}, @var{p}, @dots{}) -Return the class of the object @var{obj}, or create a class with -fields from structure @var{s} and name (string) @var{id}. - -Additional arguments name a list of parent classes from which the new class -is derived. +@deftypefnx {} {@var{cls} =} class (@var{s}, @var{classname}) +@deftypefnx {} {@var{cls} =} class (@var{s}, @var{classname}, @var{parent1}, @dots{}) +Return the class of the object @var{obj}, or create a class with fields from +structure @var{s} and name (string) @var{classname}. + +Additional arguments name a list of parent classes from which the new class is +derived. @seealso{typeinfo, isa} @end deftypefn */) { @@ -1911,7 +1911,7 @@ DEFUN (__parent_classes__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __parent_classes__ (@var{x}) +@deftypefn {} {@var{Ccls} =} __parent_classes__ (@var{x}) Undocumented internal function. @end deftypefn */) { @@ -2038,7 +2038,7 @@ inf_class.c_str (), sup_class.c_str ()); } - return octave_value(); + return ovl (); } // The following classes allow us to define "inline" function objects as @@ -2148,14 +2148,11 @@ DEFUN (__inline_ctor__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __inline_ctor__ (@var{prop_struct}) -Internal function. - +@deftypefn {} {@var{inline_obj} =} __inline_ctor__ (@var{prop_struct}) Implements final construction for inline objects. @end deftypefn */) { // Input validation has already been done in input.m. - return octave_value (new octave_inline (args(0).map_value ())); } diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-classdef.cc --- a/libinterp/octave-value/ov-classdef.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-classdef.cc Mon Apr 04 10:31:48 2022 -0700 @@ -603,21 +603,21 @@ DEFUN (__meta_get_package__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __meta_get_package__ () +@deftypefn {} {@var{pkg} =} __meta_get_package__ (@var{pkg_name}) Undocumented internal function. @end deftypefn */) { if (args.length () != 1) print_usage (); - std::string cname = args(0).xstring_value ("PACKAGE_NAME must be a string"); + std::string cname = args(0).xstring_value ("PKG_NAME must be a string"); return to_ov (lookup_package (cname)); } DEFUN (metaclass, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} metaclass (obj) +@deftypefn {} {@var{metaclass_obj} =} metaclass (obj) Returns the meta.class object corresponding to the class of @var{obj}. @end deftypefn */) { @@ -636,17 +636,17 @@ DEFUN (properties, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} properties (@var{class_name}) -@deftypefnx {} {} properties (@var{obj}) -@deftypefnx {} {@var{plist} =} properties (@dots{}) -Return or display the public properties for the named class -@var{class_name} or classdef object @var{obj}. +@deftypefn {} {} properties (@var{obj}) +@deftypefnx {} {} properties (@var{class_name}) +@deftypefnx {} {@var{proplist} =} properties (@dots{}) +Display or return the public properties for the classdef object @var{obj} or +the named class @var{class_name}. -If an output value is requested, return the list of property names in a -cell array. +If an output value is requested, return the list of property names in a cell +array. -Programming Note: Property names are returned if the @code{GetAccess} -attribute is public and if the @code{Hidden} attribute is false. +Programming Note: Property names are returned if the @code{GetAccess} attribute +is public and if the @code{Hidden} attribute is false. @seealso{methods} @end deftypefn */) { @@ -722,10 +722,8 @@ DEFMETHOD (__methods__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __methods__ (@var{x}) -@deftypefnx {} {} __methods__ ("classname") -Internal function. - +@deftypefn {} {@var{mtds} =} __methods__ (@var{obj}) +@deftypefnx {} {@var{mtds} =} __methods__ ("classname") Implements @code{methods} for Octave class objects and classnames. @seealso{methods} @end deftypefn */) @@ -764,7 +762,6 @@ } // The following will also find methods for legacy @CLASS objects. - load_path& lp = interp.get_load_path (); sv.append (lp.methods (class_name)); diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-fcn-handle.cc --- a/libinterp/octave-value/ov-fcn-handle.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-fcn-handle.cc Mon Apr 04 10:31:48 2022 -0700 @@ -3471,9 +3471,9 @@ DEFUN (func2str, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} func2str (@var{fcn_handle}) -Return a string containing the name of the function referenced by the -function handle @var{fcn_handle}. +@deftypefn {} {@var{str} =} func2str (@var{fcn_handle}) +Return a string containing the name of the function referenced by the function +handle @var{fcn_handle}. @seealso{str2func, functions} @end deftypefn */) { @@ -3505,12 +3505,23 @@ DEFMETHOD (str2func, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} str2func (@var{fcn_name}) -Return a function handle constructed from the string @var{fcn_name}. - -Previous versions of Octave accepted an optional second argument, -@qcode{"global"}, that caused str2func to ignore locally visible -functions. This option is no longer supported. +@deftypefn {} {@var{hfcn} =} str2func (@var{str}) +Return a function handle constructed from the string @var{str}. + +The input may be the name of a function such as @qcode{"sin"} or a string +defining a function such as @qcode{"@@(x) sin (x + pi)"}. + +Programming Note: In most cases it will be better to use anonymous function +syntax and let the Octave parser create the function handle rather than use +@code{str2func}. For example: + +@example +@group +hfcn = @@sin ; +hfcn = @@(x) sin (x + pi) ; +@end group +@end example + @seealso{func2str, functions} @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-java.cc --- a/libinterp/octave-value/ov-java.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-java.cc Mon Apr 04 10:31:48 2022 -0700 @@ -3037,10 +3037,14 @@ DEFUN (__java_init__, , , doc: /* -*- texinfo -*- -@deftypefn {} {} __java_init__ () -Internal function used @strong{only} when debugging Java interface. - -Function will directly call initialize_java to create an instance of a JVM. +@deftypefn {} {@var{status} =} __java_init__ () +Internal function used @strong{only} when debugging the Java interface. + +This function will directly call @code{initialize_java} to create an instance +of a JVM. + +The return variable @var{status} is 1 if the Java interface has been created, +and 0 otherwise. @end deftypefn */) { #if defined (HAVE_JAVA) @@ -3065,8 +3069,7 @@ @deftypefn {} {} __java_exit__ () Internal function used @strong{only} when debugging Java interface. -Function will directly call terminate_jvm to destroy the current JVM -instance. +Function will directly call terminate_jvm to destroy the current JVM instance. @end deftypefn */) { #if defined (HAVE_JAVA) @@ -3337,7 +3340,7 @@ DEFUN (__java2mat__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __java2mat__ (@var{javaobj}) +@deftypefn {} {@var{mat} =} __java2mat__ (@var{javaobj}) Undocumented internal function. @end deftypefn */) { diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-struct.cc --- a/libinterp/octave-value/ov-struct.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-struct.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1907,8 +1907,8 @@ DEFUN (__fieldnames__, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __fieldnames__ (@var{struct}) -@deftypefnx {} {} __fieldnames__ (@var{obj}) +@deftypefn {} {@var{names} =} __fieldnames__ (@var{struct}) +@deftypefnx {} {@var{names} =} __fieldnames__ (@var{obj}) Internal function. Implements @code{fieldnames()} for structures and Octave objects. @@ -1988,7 +1988,7 @@ DEFUN (numfields, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} numfields (@var{s}) +@deftypefn {} {@var{n} =} numfields (@var{s}) Return the number of fields of the structure @var{s}. @seealso{fieldnames} @end deftypefn */) @@ -2056,8 +2056,8 @@ DEFUN (cell2struct, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} cell2struct (@var{cell}, @var{fields}) -@deftypefnx {} {} cell2struct (@var{cell}, @var{fields}, @var{dim}) +@deftypefn {} {@var{S} =} cell2struct (@var{cell}, @var{fields}) +@deftypefnx {} {@var{S} =} cell2struct (@var{cell}, @var{fields}, @var{dim}) Convert @var{cell} to a structure. The number of fields in @var{fields} must match the number of elements in @@ -2067,10 +2067,10 @@ @example @group -A = cell2struct (@{"Peter", "Hannah", "Robert"; +S = cell2struct (@{"Peter", "Hannah", "Robert"; 185, 170, 168@}, @{"Name","Height"@}, 1); -A(1) +S(1) @result{} @{ Name = Peter diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-typeinfo.cc --- a/libinterp/octave-value/ov-typeinfo.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-typeinfo.cc Mon Apr 04 10:31:48 2022 -0700 @@ -909,8 +909,8 @@ DEFMETHOD (typeinfo, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} typeinfo () -@deftypefnx {} {} typeinfo (@var{expr}) +@deftypefn {} {@var{typestr} =} typeinfo (@var{expr}) +@deftypefnx {} {@var{cstr} =} typeinfo () Return the type of the expression @var{expr}, as a string. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov-usr-fcn.cc --- a/libinterp/octave-value/ov-usr-fcn.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov-usr-fcn.cc Mon Apr 04 10:31:48 2022 -0700 @@ -652,8 +652,8 @@ DEFMETHOD (nargin, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} nargin () -@deftypefnx {} {} nargin (@var{fcn}) +@deftypefn {} {@var{n} =} nargin () +@deftypefnx {} {@var{n} =} nargin (@var{fcn}) Report the number of input arguments to a function. Called from within a function, return the number of arguments passed to the @@ -741,8 +741,8 @@ DEFMETHOD (nargout, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} nargout () -@deftypefnx {} {} nargout (@var{fcn}) +@deftypefn {} {@var{n} =} nargout () +@deftypefnx {} {@var{n} =} nargout (@var{fcn}) Report the number of output arguments from a function. Called from within a function, return the number of values the caller diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave-value/ov.cc --- a/libinterp/octave-value/ov.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave-value/ov.cc Mon Apr 04 10:31:48 2022 -0700 @@ -1306,7 +1306,7 @@ DEFUN (double, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} double (@var{x}) +@deftypefn {} {@var{y} =} double (@var{x}) Convert @var{x} to double precision type. @seealso{single} @end deftypefn */) @@ -1350,7 +1350,7 @@ DEFUN (single, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} single (@var{x}) +@deftypefn {} {@var{y} =} single (@var{x}) Convert @var{x} to single precision type. @seealso{double} @end deftypefn */) @@ -1391,7 +1391,7 @@ DEFUN (int8, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} int8 (@var{x}) +@deftypefn {} {@var{y} =} int8 (@var{x}) Convert @var{x} to 8-bit integer type. @seealso{uint8, int16, uint16, int32, uint32, int64, uint64} @end deftypefn */) @@ -1413,7 +1413,7 @@ DEFUN (int16, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} int16 (@var{x}) +@deftypefn {} {@var{y} =} int16 (@var{x}) Convert @var{x} to 16-bit integer type. @seealso{int8, uint8, uint16, int32, uint32, int64, uint64} @end deftypefn */) @@ -1435,7 +1435,7 @@ DEFUN (int32, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} int32 (@var{x}) +@deftypefn {} {@var{y} =} int32 (@var{x}) Convert @var{x} to 32-bit integer type. @seealso{int8, uint8, int16, uint16, uint32, int64, uint64} @end deftypefn */) @@ -1457,7 +1457,7 @@ DEFUN (int64, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} int64 (@var{x}) +@deftypefn {} {@var{y} =} int64 (@var{x}) Convert @var{x} to 64-bit integer type. @seealso{int8, uint8, int16, uint16, int32, uint32, uint64} @end deftypefn */) @@ -1479,7 +1479,7 @@ DEFUN (uint8, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} uint8 (@var{x}) +@deftypefn {} {@var{y} =} uint8 (@var{x}) Convert @var{x} to unsigned 8-bit integer type. @seealso{int8, int16, uint16, int32, uint32, int64, uint64} @end deftypefn */) @@ -1501,7 +1501,7 @@ DEFUN (uint16, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} uint16 (@var{x}) +@deftypefn {} {@var{y} =} uint16 (@var{x}) Convert @var{x} to unsigned 16-bit integer type. @seealso{int8, uint8, int16, int32, uint32, int64, uint64} @end deftypefn */) @@ -1523,7 +1523,7 @@ DEFUN (uint32, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} uint32 (@var{x}) +@deftypefn {} {@var{y} =} uint32 (@var{x}) Convert @var{x} to unsigned 32-bit integer type. @seealso{int8, uint8, int16, uint16, int32, int64, uint64} @end deftypefn */) @@ -1545,7 +1545,7 @@ DEFUN (uint64, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} uint64 (@var{x}) +@deftypefn {} {@var{y} =} uint64 (@var{x}) Convert @var{x} to unsigned 64-bit integer type. @seealso{int8, uint8, int16, uint16, int32, uint32, int64} @end deftypefn */) @@ -3724,7 +3724,7 @@ DEFUN (sizeof, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} sizeof (@var{val}) +@deftypefn {} {@var{sz} =} sizeof (@var{val}) Return the size of @var{val} in bytes. @seealso{whos} @end deftypefn */) @@ -3802,7 +3802,7 @@ DEFUN (subsref, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} subsref (@var{val}, @var{idx}) +@deftypefn {} {@var{newval} =} subsref (@var{val}, @var{idx}) Perform the subscripted element selection operation on @var{val} according to the subscript specified by @var{idx}. @@ -3854,7 +3854,7 @@ DEFUN (subsasgn, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} subsasgn (@var{val}, @var{idx}, @var{rhs}) +@deftypefn {} {@var{newval} =} subsasgn (@var{val}, @var{idx}, @var{rhs}) Perform the subscripted assignment operation according to the subscript specified by @var{idx}. diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/octave.cc --- a/libinterp/octave.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/octave.cc Mon Apr 04 10:31:48 2022 -0700 @@ -450,7 +450,7 @@ DEFUN (argv, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} argv () +@deftypefn {} {@var{args} =} argv () Return the command line arguments passed to Octave. For example, if you invoked Octave using the command @@ -481,9 +481,9 @@ DEFUN (cmdline_options, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} argv () -Return a structure containing info about the command line arguments -passed to Octave. +@deftypefn {} {@var{opt_struct} =} cmdline_options () +Return a structure containing info about the command line arguments passed to +Octave. @end deftypefn */) { if (args.length () != 0) @@ -501,13 +501,13 @@ DEFUN (program_invocation_name, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} program_invocation_name () +@deftypefn {} {@var{name} =} program_invocation_name () Return the name that was typed at the shell prompt to run Octave. -If executing a script from the command line (e.g., @code{octave foo.m}) -or using an executable Octave script, the program name is set to the -name of the script. @xref{Executable Octave Programs}, for an example of -how to create an executable Octave script. +If executing a script from the command line (e.g., @code{octave foo.m}) or +using an executable Octave script, the program name is set to the name of the +script. @xref{Executable Octave Programs}, for an example of how to create an +executable Octave script. @seealso{program_name} @end deftypefn */) { @@ -524,7 +524,7 @@ DEFUN (program_name, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} program_name () +@deftypefn {} {@var{name} =} program_name () Return the last component of the value returned by @code{program_invocation_name}. @seealso{program_invocation_name} diff -r 4bab8d3fce79 -r 32d2b6604a9f libinterp/parse-tree/profiler.cc --- a/libinterp/parse-tree/profiler.cc Mon Apr 04 00:20:48 2022 -0400 +++ b/libinterp/parse-tree/profiler.cc Mon Apr 04 10:31:48 2022 -0700 @@ -385,7 +385,7 @@ // Enable or disable the profiler data collection. DEFMETHOD (__profiler_enable__, interp, args, , doc: /* -*- texinfo -*- -@deftypefn {} {} __profiler_enable__ () +@deftypefn {} {@var{state} =} __profiler_enable__ () Undocumented internal function. @end deftypefn */) { @@ -431,7 +431,7 @@ // Query the timings collected by the profiler. DEFMETHOD (__profiler_data__, interp, args, nargout, doc: /* -*- texinfo -*- -@deftypefn {} {} __profiler_data__ () +@deftypefn {} {@var{data} =} __profiler_data__ () Undocumented internal function. @end deftypefn */) {