Mercurial > octave
changeset 31375:96f751f8392c
doc: grammar check documentation ahead of 8.1 release.
* numbers.txi, vectorize.txi, besselj.cc, data.cc, oct-hist.cc, pr-output.cc,
ov-bool-mat.cc, LSODE-opts.in, quadgk.m, warning_ids.m,
clearAllMemoizedCaches.m, memoize.m, nthargout.m, pkg.m, print.m, movslice.m:
Grammar check documentation ahead of 8.1 release.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 30 Oct 2022 21:58:36 -0700 |
parents | c0f1a817c058 |
children | ad8a4102f910 |
files | doc/interpreter/numbers.txi doc/interpreter/vectorize.txi libinterp/corefcn/besselj.cc libinterp/corefcn/data.cc libinterp/corefcn/oct-hist.cc libinterp/corefcn/pr-output.cc libinterp/octave-value/ov-bool-mat.cc liboctave/numeric/LSODE-opts.in scripts/general/quadgk.m scripts/help/warning_ids.m scripts/miscellaneous/clearAllMemoizedCaches.m scripts/miscellaneous/memoize.m scripts/miscellaneous/nthargout.m scripts/pkg/pkg.m scripts/plot/util/print.m scripts/signal/movslice.m |
diffstat | 16 files changed, 40 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/numbers.txi Sun Oct 30 10:54:12 2022 -0700 +++ b/doc/interpreter/numbers.txi Sun Oct 30 21:58:36 2022 -0700 @@ -733,8 +733,8 @@ @noindent where the results are respectively of types uint8, single, and single -respectively. This is done for Matlab compatibility. Valid mixed operations -are defined as follows: +respectively. This is done for @sc{matlab} compatibility. Valid mixed +operations are defined as follows: @multitable @columnfractions .2 .3 .3 .2 @headitem @tab Mixed Operation @tab Result @tab
--- a/doc/interpreter/vectorize.txi Sun Oct 30 10:54:12 2022 -0700 +++ b/doc/interpreter/vectorize.txi Sun Oct 30 21:58:36 2022 -0700 @@ -581,6 +581,7 @@ In the above example, the first line creates a memoized version @code{foo2} of the function @code{foo}. For simple functions with only trivial wrapping, this line can also be shortened to: + @example @group foo2 = memoize (@@foo); @@ -603,6 +604,7 @@ speed it up. Recursive functions can be memoized as well, using a pattern like: + @example @group function z = foo (x, y)
--- a/libinterp/corefcn/besselj.cc Sun Oct 30 10:54:12 2022 -0700 +++ b/libinterp/corefcn/besselj.cc Sun Oct 30 21:58:36 2022 -0700 @@ -646,7 +646,7 @@ @code{airy (0, @var{z})}. The optional third input @var{scale} determines whether to -apply scaling as described above. It is false by default. +apply scaling as described above. It is false by default. The result @var{a} is the same size as @var{z}.
--- a/libinterp/corefcn/data.cc Sun Oct 30 10:54:12 2022 -0700 +++ b/libinterp/corefcn/data.cc Sun Oct 30 21:58:36 2022 -0700 @@ -144,7 +144,7 @@ @end example If the optional argument @var{dim} is supplied, work along dimension @var{dim}. -For example: +For example: @example @group
--- a/libinterp/corefcn/oct-hist.cc Sun Oct 30 10:54:12 2022 -0700 +++ b/libinterp/corefcn/oct-hist.cc Sun Oct 30 21:58:36 2022 -0700 @@ -819,8 +819,8 @@ The default value is @file{@w{@env{$DATA}}/octave/history}, where @w{@env{$DATA}} is the platform-specific location for (roaming) user data files -(e.g., @w{@env{$XDG_DATA_HOME}} or, if that is not set, @file{~/.local/share} on -Unix-like operating systems or @w{@env{%APPDATA%}} on Windows). The default +(e.g., @w{@env{$XDG_DATA_HOME}} or, if that is not set, @file{~/.local/share} +on Unix-like operating systems or @w{@env{%APPDATA%}} on Windows). The default value may be overridden by the environment variable @w{@env{OCTAVE_HISTFILE}}. Programming Notes:
--- a/libinterp/corefcn/pr-output.cc Sun Oct 30 10:54:12 2022 -0700 +++ b/libinterp/corefcn/pr-output.cc Sun Oct 30 21:58:36 2022 -0700 @@ -3871,6 +3871,7 @@ 8.1058e+15 @end group @end example + Optionally, the trailing @samp{g} can be split into a second argument. @item shorteng @@ -3984,7 +3985,7 @@ @end table If @code{format} is called with multiple competing options, the rightmost one -is used, except for @samp{default} which will override all other options. In +is used, except for @samp{default} which will override all other options. In case of an error the format remains unchanged. If called with one to three output arguments, and no inputs, return the current
--- a/libinterp/octave-value/ov-bool-mat.cc Sun Oct 30 10:54:12 2022 -0700 +++ b/libinterp/octave-value/ov-bool-mat.cc Sun Oct 30 21:58:36 2022 -0700 @@ -594,7 +594,8 @@ 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 */) {
--- a/liboctave/numeric/LSODE-opts.in Sun Oct 30 10:54:12 2022 -0700 +++ b/liboctave/numeric/LSODE-opts.in Sun Oct 30 21:58:36 2022 -0700 @@ -159,6 +159,7 @@ NAME = "step limit" DOC_ITEM Maximum number of steps allowed (default is 100000). + END_DOC_ITEM TYPE = "octave_idx_type" INIT_VALUE = "100000"
--- a/scripts/general/quadgk.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/general/quadgk.m Sun Oct 30 21:58:36 2022 -0700 @@ -52,8 +52,9 @@ ## operator @code{./} and all user functions to @code{quadgk} should do the ## same. ## -## The optional argument @var{abstol} defines the absolute tolerance used to stop -## the integration procedure. The default value is 1e-10 (1e-5 for single). +## The optional argument @var{abstol} defines the absolute tolerance used to +## stop the integration procedure. The default value is 1e-10 (1e-5 for +## single). ## ## The algorithm used by @code{quadgk} involves subdividing the integration ## interval and evaluating each subinterval. If @var{trace} is true then after @@ -83,6 +84,7 @@ ## quadgk (@@(x) x .^ (1:5), 0, 2, "ArrayValued", 1) ## @end example ## +## @noindent ## will integrate @code{[x.^1, x.^2, x.^3, x.^4, x.^5]} in one function call ## rather than having to repeatedly define a single anonymous function and ## use a normal invocation of @code{quadgk}.
--- a/scripts/help/warning_ids.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/help/warning_ids.m Sun Oct 30 21:58:36 2022 -0700 @@ -181,8 +181,8 @@ ## @item Octave:datevec:date-format-spec ## If the @code{Octave:datevec:date-format-spec} warning is enabled, a warning ## is printed if the date format specification contains questionable date or -## time specifiers. Typical bad patterns are using upper case date specifiers -## or lower case time specifiers. +## time specifiers. Typical bad patterns are using uppercase date specifiers +## or lowercase time specifiers. ## By default, the @code{Octave:datevec:date-format-spec} warning is enabled. ## ## @item Octave:deprecated-function
--- a/scripts/miscellaneous/clearAllMemoizedCaches.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/miscellaneous/clearAllMemoizedCaches.m Sun Oct 30 21:58:36 2022 -0700 @@ -24,7 +24,7 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {} clearAllMemoizedCaches () +## @deftypefn {} {} clearAllMemoizedCaches () ## Clear all memoized caches. ## ## Memoization maintains internal tables of which functions have been called
--- a/scripts/miscellaneous/memoize.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/miscellaneous/memoize.m Sun Oct 30 21:58:36 2022 -0700 @@ -24,7 +24,7 @@ ######################################################################## ## -*- texinfo -*- -## @deftypefn {} {@var{mem_fcn_handle} =} memoize (@var{fcn_handle}) +## @deftypefn {} {@var{mem_fcn_handle} =} memoize (@var{fcn_handle}) ## ## Create a memoized version @var{mem_fcn_handle} of function @var{fcn_handle}. ##
--- a/scripts/miscellaneous/nthargout.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/miscellaneous/nthargout.m Sun Oct 30 21:58:36 2022 -0700 @@ -36,7 +36,7 @@ ## requested output arguments. ## ## The intended use of @code{nthargout} is to avoid intermediate variables. -## For example, when finding the indices of the maximum entry of a matrix, the +## For example, when finding the indices of the maximum entry of a matrix, the ## following two compositions of @code{nthargout} ## ## @example
--- a/scripts/pkg/pkg.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/pkg/pkg.m Sun Oct 30 21:58:36 2022 -0700 @@ -168,21 +168,24 @@ ## ## Options for the install command and the names of individual packages to be ## checked for updates may be specified as a list following the update -## command. If the @option{-local} or @option{-global} option is specified, +## command. If the @option{-local} or @option{-global} option is specified, ## @code{pkg update} limits the update check to the local or global installed ## packages, and installs updates in that same context. For example, ## ## Update all packages: +## ## @example ## pkg update ## @end example ## ## Update all local packages: +## ## @example ## pkg update -local ## @end example ## ## Update certain packages, ignore dependencies, max verbosity: +## ## @example ## pkg update -verbose -nodeps image signal geometry ## @end example
--- a/scripts/plot/util/print.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/plot/util/print.m Sun Oct 30 21:58:36 2022 -0700 @@ -118,13 +118,14 @@ ## ## @item -image | -opengl ## @itemx -vector | -painters -## Specifies whether the pixel-based renderer (@env{-image} or @env{-opengl}) -## or vector-based renderer (@env{-vector} or @env{-painters}) is used. This -## is equivalent to changing the figure's @qcode{"Renderer"} property. When -## the figure @nospell{@qcode{"RendererMode"}} property is @qcode{"auto"} (the -## default) Octave will use the @qcode{"opengl"} renderer for raster formats -## (e.g., JPEG) and @qcode{"painters"} for vector formats (e.g., PDF)@. These -## options are only supported for the "qt" graphics toolkit. +## Specifies whether the pixel-based renderer (@option{-image} or +## @option{-opengl}) or vector-based renderer (@option{-vector} or +## @option{-painters}) is used. This is equivalent to changing the figure's +## @qcode{"Renderer"} property. When the figure +## @nospell{@qcode{"RendererMode"}} property is @qcode{"auto"} (the default) +## Octave will use the @qcode{"opengl"} renderer for raster formats (e.g., +## JPEG) and @qcode{"painters"} for vector formats (e.g., PDF)@. These options +## are only supported for the "qt" graphics toolkit. ## ## @item -svgconvert ## When using the @option{-painters} renderer, this enables a different
--- a/scripts/signal/movslice.m Sun Oct 30 10:54:12 2022 -0700 +++ b/scripts/signal/movslice.m Sun Oct 30 21:58:36 2022 -0700 @@ -36,14 +36,15 @@ ## is symmetric and includes @w{@code{(@var{wlen} - 1) / 2}} elements on either ## side of the central element. If @var{wlen} is even the window is asymmetric ## and has @w{@code{@var{wlen}/2}} elements to the left of the central element -## and @w{@code{@var{wlen}/2 - 1}} elements to the right of the central element. -## When @var{wlen}is a 2-element array , @w{@code{[@var{nb}, @var{na}]}}, the -## window includes @var{nb} elements to the left of the current element and -## @var{na} elements to the right of the current element. +## and @w{@code{@var{wlen}/2 - 1}} elements to the right of the central +## element. When @var{wlen} is a 2-element array, +## @w{@code{[@var{nb}, @var{na}]}}, the window includes @var{nb} elements to +## the left of the current element and @var{na} elements to the right of the +## current element. ## ## The output @var{slcidx} is an array of indices of the slices that fit fully ## within the vector, where each column is an individual slice as the window -## moves from left to right. The slices have @var{wlen} elements for scalar +## moves from left to right. The slices have @var{wlen} elements for scalar ## @var{wlen}, or @w{@code{@var{nb} + @var{na} + 1}} elements for array valued ## @var{wlen}. ##