changeset 24575:93714122ed59 stable

doc: Fixes for signal, image, audio, and OOP chapters (bug #52844). * oop.txi: Remove duplicate word "can". * package.txi: Change @example code to find current_installation_directory so that it would actually run. Rewrite BuildRequires item. * plot.txi: Re-phrase language about when Contour group objects are created. * fft.cc (Ffft, Fifft): Use the same variable name 'x' in docstring as in @deftypefn. Add period to final sentence of docstring. * fft2.cc (Ffft2): Add period to final sentence of docstring. * lin2mu.m: Add output variable 'y' to @deftypefn. * mu2lin.m: Add output variable 'y' to @deftypefn. Space out mathematical expression for better readibility. * ind2gray.m: Use the same variable name 'map' in docstring as in @deftypefn. * rgb2ind.m: Add period to final sentence of docstring. * periodogram.m: Use ':' operator rather than '..' to indicate range.
author Rik <rik@octave.org>
date Tue, 09 Jan 2018 21:10:38 -0800
parents 1c1adf6ab75d
children e6b22e378389 6523facc5d81
files doc/interpreter/oop.txi doc/interpreter/package.txi doc/interpreter/plot.txi libinterp/corefcn/fft.cc libinterp/corefcn/fft2.cc scripts/audio/lin2mu.m scripts/audio/mu2lin.m scripts/image/ind2gray.m scripts/image/rgb2ind.m scripts/signal/periodogram.m
diffstat 10 files changed, 25 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/oop.txi	Mon Jan 08 12:24:33 2018 -0800
+++ b/doc/interpreter/oop.txi	Tue Jan 09 21:10:38 2018 -0800
@@ -429,7 +429,7 @@
 
 Functions that are of particular interest for overloading are the class
 conversion functions such as @code{double}.  Overloading these functions allows
-the @code{cast} function to work with a user class.  It can also can aid in the
+the @code{cast} function to work with a user class.  It can also aid in the
 use of a class object with methods and functions from other classes since the
 object can be transformed to the requisite input form for the new function.
 An example @code{double} function for the polynomial class might look like
--- a/doc/interpreter/package.txi	Mon Jan 08 12:24:33 2018 -0800
+++ b/doc/interpreter/package.txi	Tue Jan 09 21:10:38 2018 -0800
@@ -154,7 +154,7 @@
 The current installation directory can be retrieved by typing
 
 @example
-current_installation_directory = pkg prefix
+current_installation_directory = pkg ("prefix")
 @end example
 
 To function properly the package manager needs to keep some
@@ -412,13 +412,12 @@
 @code{Depends} keyword.
 
 @item BuildRequires
-These are the external build dependencies of the package and are not
-checked by the package manager.  This is here as a hint to the
-distribution packager.  They follow the same conventions as the
-@code{Depends} keyword.  Note that in general, packaging systems such
-as @code{rpm} or @code{deb} and autoprobe the install dependencies
-from the build dependencies, and therefore the often a
-@code{BuildRequires} dependency removes the need for a
+These are the external build dependencies of the package and are not checked by
+the package manager.  This is here as a hint to the distribution packager.
+They follow the same conventions as the @code{Depends} keyword.  Note that in
+general, packaging systems such as @code{rpm} or @code{deb} autoprobe the
+install dependencies from the build dependencies, and therefore a
+@code{BuildRequires} dependency usually removes the need for a
 @code{SystemRequirements} dependency.
 
 @end table
--- a/doc/interpreter/plot.txi	Mon Jan 08 12:24:33 2018 -0800
+++ b/doc/interpreter/plot.txi	Tue Jan 09 21:10:38 2018 -0800
@@ -2160,10 +2160,10 @@
 @cindex series objects
 @cindex contour series
 
-Contour group objects are created by the @code{contour}, @code{contourf}
-and @code{contour3} functions.  The are equally one of the handles returned
-by the @code{surfc} and @code{meshc} functions.  The properties of the contour
-group are
+Contour group objects are created by the @code{contour}, @code{contourf}, and
+@code{contour3} functions.  The are also one of the handles returned by the
+@code{surfc} and @code{meshc} functions.  The properties of the contour group
+are
 
 @table @code
 @item contourmatrix
--- a/libinterp/corefcn/fft.cc	Mon Jan 08 12:24:33 2018 -0800
+++ b/libinterp/corefcn/fft.cc	Tue Jan 09 21:10:38 2018 -0800
@@ -186,7 +186,7 @@
 @deftypefn  {} {} fft (@var{x})
 @deftypefnx {} {} fft (@var{x}, @var{n})
 @deftypefnx {} {} fft (@var{x}, @var{n}, @var{dim})
-Compute the discrete Fourier transform of @var{A} using
+Compute the discrete Fourier transform of @var{x} using
 a Fast Fourier Transform (FFT) algorithm.
 
 The FFT is calculated along the first non-singleton dimension of the
@@ -202,7 +202,7 @@
 @var{x} is truncated.
 
 If called with three arguments, @var{dim} is an integer specifying the
-dimension of the matrix along which the FFT is performed
+dimension of the matrix along which the FFT is performed.
 @seealso{ifft, fft2, fftn, fftw}
 @end deftypefn */)
 {
@@ -215,7 +215,7 @@
 @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{A}
+Compute the inverse discrete Fourier transform of @var{x}
 using a Fast Fourier Transform (FFT) algorithm.
 
 The inverse FFT is calculated along the first non-singleton dimension
@@ -231,7 +231,7 @@
 then @var{x} 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
+dimension of the matrix along which the inverse FFT is performed.
 @seealso{fft, ifft2, ifftn, fftw}
 @end deftypefn */)
 {
--- a/libinterp/corefcn/fft2.cc	Mon Jan 08 12:24:33 2018 -0800
+++ b/libinterp/corefcn/fft2.cc	Tue Jan 09 21:10:38 2018 -0800
@@ -171,7 +171,7 @@
 size of @var{A}, @var{A} 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
+of @var{A} is treated separately.
 @seealso{fft2, ifft, ifftn, fftw}
 @end deftypefn */)
 {
--- a/scripts/audio/lin2mu.m	Mon Jan 08 12:24:33 2018 -0800
+++ b/scripts/audio/lin2mu.m	Tue Jan 09 21:10:38 2018 -0800
@@ -17,7 +17,7 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {} {} lin2mu (@var{x}, @var{n})
+## @deftypefn {} {@var{y} =} lin2mu (@var{x}, @var{n})
 ## Convert audio data from linear to mu-law.
 ##
 ## Mu-law values use 8-bit unsigned integers.  Linear values use @var{n}-bit
--- a/scripts/audio/mu2lin.m	Mon Jan 08 12:24:33 2018 -0800
+++ b/scripts/audio/mu2lin.m	Tue Jan 09 21:10:38 2018 -0800
@@ -17,12 +17,12 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {} {} mu2lin (@var{x}, @var{n})
+## @deftypefn {} {@var{y} =} mu2lin (@var{x}, @var{n})
 ## Convert audio data from mu-law to linear.
 ##
 ## Mu-law values are 8-bit unsigned integers.  Linear values use @var{n}-bit
-## signed integers or floating point values in the range -1@leq{}y@leq{}1 if
-## @var{n} is 0.
+## signed integers or floating point values in the range -1 @leq{} @var{y}
+## @leq{} 1 if @var{n} is 0.
 ##
 ## If @var{n} is not specified it defaults to 0.
 ## @seealso{lin2mu}
--- a/scripts/image/ind2gray.m	Mon Jan 08 12:24:33 2018 -0800
+++ b/scripts/image/ind2gray.m	Tue Jan 09 21:10:38 2018 -0800
@@ -21,7 +21,7 @@
 ## Convert a color indexed image to a grayscale intensity image.
 ##
 ## The image @var{x} must be an indexed image which will be converted using the
-## colormap @var{cmap}.  If @var{cmap} does not contain enough colors for the
+## colormap @var{map}.  If @var{map} does not contain enough colors for the
 ## image, pixels in @var{x} outside the range are mapped to the last color in
 ## the map before conversion to grayscale.
 ##
--- a/scripts/image/rgb2ind.m	Mon Jan 08 12:24:33 2018 -0800
+++ b/scripts/image/rgb2ind.m	Tue Jan 09 21:10:38 2018 -0800
@@ -31,7 +31,7 @@
 ## quantization is performed.  The output class of the indexed image @var{x}
 ## can be uint8, uint16 or double, whichever is required to specify the
 ## number of unique colors in the image (which will be equal to the number
-## of rows in @var{map}) in order
+## of rows in @var{map}) in order.
 ##
 ## Multi-dimensional indexed images (of size @nospell{MxNx3xK}) are also
 ## supported, both via a single input (@var{rgb}) or its three color channels
--- a/scripts/signal/periodogram.m	Mon Jan 08 12:24:33 2018 -0800
+++ b/scripts/signal/periodogram.m	Tue Jan 09 21:10:38 2018 -0800
@@ -54,8 +54,8 @@
 ##
 ## @item range
 ## range of spectrum.  @qcode{"@nospell{onesided}"} computes spectrum from
-## [0..nfft/2+1].  @qcode{"@nospell{twosided}"} computes spectrum from
-## [0..nfft-1].
+## [0:nfft/2+1].  @qcode{"@nospell{twosided}"} computes spectrum from
+## [0:nfft-1].
 ## @end table
 ##
 ## The optional second output @var{w} are the normalized angular frequencies.