# HG changeset patch # User Nicholas R. Jankowski # Date 1702068172 18000 # Node ID c273d7fdab3a550beac9811d5e6a86aafe404d42 # Parent 9c5b8e82bbae326f26376dee8fb21b207a466c9e doc: Add height and width info to rows and columns docstrings (bug #64995) * /libinterp/coredata.cc (rows, columns): Add deftypefnx and programming notes about height and width aliases. * NEWS.10.md: Note addition of aliases under Matlab Compatibility. diff -r 9c5b8e82bbae -r c273d7fdab3a etc/NEWS.10.md --- a/etc/NEWS.10.md Mon Dec 11 22:04:31 2023 -0500 +++ b/etc/NEWS.10.md Fri Dec 08 15:42:52 2023 -0500 @@ -9,6 +9,8 @@ ### Matlab compatibility +- `height` and `width` are now aliases for the `rows` and `columns` functions. + ### Alphabetical list of new functions added in Octave 10 ### Deprecated functions, properties, and operators diff -r 9c5b8e82bbae -r c273d7fdab3a libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Mon Dec 11 22:04:31 2023 -0500 +++ b/libinterp/corefcn/data.cc Fri Dec 08 15:42:52 2023 -0500 @@ -2993,9 +2993,14 @@ DEFUN (rows, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{nr} =} rows (@var{A}) +@deftypefnx () {@var{nr} =} height (@var{A}) Return the number of rows of @var{A}. This is equivalent to @code{size (@var{A}, 1)}. + +Programming Note: @code{height} is an alias for @code{rows} and either name +can be used in Octave. + @seealso{columns, size, length, numel, isscalar, isvector, ismatrix} @end deftypefn */) { @@ -3040,9 +3045,14 @@ DEFUN (columns, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{nc} =} columns (@var{A}) +@deftypefnx {} {@var{nc} =} width (@var{A}) Return the number of columns of @var{A}. This is equivalent to @code{size (@var{A}, 2)}. + +Programming Note: @code{width} is an alias for @code{columns} and either name +can be used in Octave. + @seealso{rows, size, length, numel, isscalar, isvector, ismatrix} @end deftypefn */) {