changeset 9070:e9dc2ed2ec0f

Cleanup documentation for poly.texi, interp.texi, geometry.texi Grammarcheck input .txi files Spellcheck .texi files
author Rik <rdrider0-list@yahoo.com>
date Sun, 29 Mar 2009 10:22:56 -0700
parents 634274aaa183
children 034800482c79
files doc/interpreter/geometry.txi doc/interpreter/interp.txi doc/interpreter/poly.txi scripts/general/interp1.m scripts/general/interp3.m scripts/general/interpn.m scripts/geometry/delaunay.m scripts/geometry/tsearchn.m scripts/polynomial/convn.m scripts/polynomial/mpoles.m
diffstat 10 files changed, 62 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/geometry.txi
+++ b/doc/interpreter/geometry.txi
@@ -19,12 +19,13 @@
 @node Geometry
 @chapter Geometry
 
-Much of geometry code in Octave is based on the QHull library@footnote{Barber,
-C.B., Dobkin, D.P., and Huhdanpaa, H.T., "The Quickhull algorithm for
-convex hulls," ACM Trans. on Mathematical Software, 22(4):469-483, Dec
-1996, @url{http://www.qhull.org}}. Some of the documentation for Qhull,
-particularly for the options that can be passed to @code{delaunay},
-@code{voronoi} and @code{convhull}, etc, is relevant to Octave users.
+Much of the geometry code in Octave is based on the Qhull 
+library@footnote{Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., 
+"The Quickhull algorithm for convex hulls," ACM Trans. on Mathematical 
+Software, 22(4):469--483, Dec 1996, @url{http://www.qhull.org}}.  
+Some of the documentation for Qhull, particularly for the options that 
+can be passed to @code{delaunay}, @code{voronoi} and @code{convhull}, 
+etc., is relevant to Octave users.
 
 @menu
 * Delaunay Triangulation::
@@ -37,15 +38,15 @@
 @section Delaunay Triangulation
 
 The Delaunay triangulation is constructed from a set of
-circum-circles. These circum-circles are chosen so that there are at
+circum-circles.  These circum-circles are chosen so that there are at
 least three of the points in the set to triangulation on the
-circumference of the circum-circle. None of the points in the set of
+circumference of the circum-circle.  None of the points in the set of
 points falls within any of the circum-circles.
 
 In general there are only three points on the circumference of any
-circum-circle. However, in some cases, and in particular for the
+circum-circle.  However, in some cases, and in particular for the
 case of a regular grid, 4 or more points can be on a single
-circum-circle. In this case the Delaunay triangulation is not unique. 
+circum-circle.  In this case the Delaunay triangulation is not unique. 
 
 @DOCSTRING(delaunay)
 
@@ -165,17 +166,21 @@
 is imposed, and we can therefore write the above as
 
 @example
+@group
 @var{p} - @var{t}(end, :) = @var{beta}(1:end-1) * (@var{t}(1:end-1, :)
       - ones(@var{N}, 1) * @var{t}(end, :)
+@end group
 @end example
 
 @noindent
 Solving for @var{beta} we can then write
 
 @example
+@group
 @var{beta}(1:end-1) = (@var{p} - @var{t}(end, :)) / (@var{t}(1:end-1, :)
       - ones(@var{N}, 1) * @var{t}(end, :))
 @var{beta}(end) = sum(@var{beta}(1:end-1))
+@end group
 @end example
 
 @noindent
@@ -192,8 +197,8 @@
 Therefore, the test in @code{tsearch} and @code{tsearchn} essentially
 only needs to express each point in terms of the Barycentric coordinates
 of each of the simplices of the N-simplex and test the values of
-@var{beta}. This is exactly the implementation used in
-@code{tsearchn}. @code{tsearch} is optimized for 2-dimensions and the
+@var{beta}.  This is exactly the implementation used in
+@code{tsearchn}.  @code{tsearch} is optimized for 2-dimensions and the
 Barycentric coordinates are not explicitly formed.
 
 @DOCSTRING(tsearch)
@@ -212,7 +217,7 @@
 @end example
 
 @noindent
-consisting of two triangles defined by @var{tri}. We can then identify
+consisting of two triangles defined by @var{tri}.  We can then identify
 which triangle a point falls in like
 
 @example
@@ -235,7 +240,7 @@
 @end example
 
 The @code{dsearch} and @code{dsearchn} find the closest point in a
-tessellation to the desired point. The desired point does not
+tessellation to the desired point.  The desired point does not
 necessarily have to be in the tessellation, and even if it the returned
 point of the tessellation does not have to be one of the vertexes of the
 N-simplex within which the desired point is found.
@@ -278,7 +283,7 @@
 tessellation where @var{p} is a member of @var{s}, are closer to @var{p}
 than any other point in @var{s}.  The Voronoi diagram is related to the
 Delaunay triangulation of a set of points, in that the vertexes of the
-Voronoi tessellation are the centers of  the circum-circles of the
+Voronoi tessellation are the centers of the circum-circles of the
 simplicies of the Delaunay tessellation. 
 
 @DOCSTRING(voronoi)
@@ -303,7 +308,7 @@
 @ifset HAVE_QHULL
 @ifnotinfo
 @noindent
-The result of which can be seen in @ref{fig:voronoi}. Note that the
+The result of which can be seen in @ref{fig:voronoi}.  Note that the
 circum-circle of one of the triangles has been added to this figure, to
 make the relationship between the Delaunay tessellation and the Voronoi
 diagram clearer.
@@ -337,7 +342,7 @@
 @end example
 
 Facets of the Voronoi diagram with a vertex at infinity have infinity
-area. A simplified version of @code{polyarea} for rectangles is
+area.  A simplified version of @code{polyarea} for rectangles is
 available with @code{rectint}
 
 @DOCSTRING(rectint)
@@ -374,7 +379,7 @@
 @section Convex Hull
 
 The convex hull of a set of points is the minimum convex envelope
-containing all of the points. Octave has the functions @code{convhull}
+containing all of the points.  Octave has the functions @code{convhull}
 and @code{convhulln} to calculate the convex hull of 2-dimensional and
 N-dimensional sets of points.
 
@@ -410,12 +415,12 @@
 @section Interpolation on Scattered Data
 
 An important use of the Delaunay tessellation is that it can be used to
-interpolate from scattered data to an arbitrary set of points. To do
+interpolate from scattered data to an arbitrary set of points.  To do
 this the N-simplex of the known set of points is calculated with
-@code{delaunay}, @code{delaunay3} or @code{delaunayn}. Then the
+@code{delaunay}, @code{delaunay3} or @code{delaunayn}.  Then the
 simplicies in to which the desired points are found are
-identified. Finally the vertices of the simplicies are used to
-interpolate to the desired points. The functions that perform this
+identified.  Finally the vertices of the simplicies are used to
+interpolate to the desired points.  The functions that perform this
 interpolation are @code{griddata}, @code{griddata3} and
 @code{griddatan}.
 
--- a/doc/interpreter/interp.txi
+++ b/doc/interpreter/interp.txi
@@ -34,12 +34,12 @@
 @DOCSTRING(interp1)
 
 There are some important differences between the various interpolation
-methods. The 'spline' method enforces that both the first and second
+methods.  The 'spline' method enforces that both the first and second
 derivatives of the interpolated values have a continuous derivative,
-whereas the other methods do not. This means that the results of the
-'spline' method are generally smoother. If the function to be
+whereas the other methods do not.  This means that the results of the
+'spline' method are generally smoother.  If the function to be
 interpolated is in fact smooth, then 'spline' will give excellent
-results. However, if the function to be evaluated is in some manner
+results.  However, if the function to be evaluated is in some manner
 discontinuous, then 'pchip' interpolation might give better results.
 
 This can be demonstrated by the code
@@ -71,19 +71,19 @@
 
 @float Figure,fig:interpderiv1
 @image{interpderiv1,8cm}
-@caption{Comparison of 'phcip' and 'spline' interpolation methods for a 
+@caption{Comparison of 'pchip' and 'spline' interpolation methods for a 
 step function}
 @end float
 
 @float Figure,fig:interpderiv2
 @image{interpderiv2,8cm}
-@caption{Comparison of the second derivative of the 'phcip' and 'spline' 
+@caption{Comparison of the second derivative of the 'pchip' and 'spline' 
 interpolation methods for a step function}
 @end float
 @end ifnotinfo
 
 A simplified version of @code{interp1} that performs only linear
-interpolation is available in @code{interp1q}. This argument is slightly
+interpolation is available in @code{interp1q}.  This argument is slightly
 faster than @code{interp1} as to performs little error checking.
 
 @DOCSTRING(interp1q)
@@ -94,11 +94,11 @@
 
 @DOCSTRING(interpft)
 
-There are two significant limitations on Fourier interpolation. Firstly,
+There are two significant limitations on Fourier interpolation.  Firstly,
 the function signal is assumed to be periodic, and so non-periodic
-signals will be poorly represented at the edges. Secondly, both the
+signals will be poorly represented at the edges.  Secondly, both the
 signal and its interpolation are required to be sampled at equispaced
-points. An example of the use of @code{interpft} is
+points.  An example of the use of @code{interpft} is
 
 @example
 @group
@@ -152,9 +152,9 @@
 
 A significant difference between @code{interpn} and the other two
 multidimensional interpolation functions is the fashion in which the
-dimensions are treated. For @code{interp2} and @code{interp3}, the 'y'
+dimensions are treated.  For @code{interp2} and @code{interp3}, the 'y'
 axis is considered to be the columns of the matrix, whereas the 'x'
-axis corresponds to the rows of the array. As Octave indexes arrays in
+axis corresponds to the rows of the array.  As Octave indexes arrays in
 column major order, the first dimension of any array is the columns, and
 so @code{interpn} effectively reverses the 'x' and 'y' dimensions. 
 Consider the example
@@ -175,7 +175,7 @@
 @end example
 
 @noindent
-where @code{vi} and @code{vi2} are identical. The reversal of the
+where @code{vi} and @code{vi2} are identical.  The reversal of the
 dimensions is treated in the @code{meshgrid} and @code{ndgrid} functions
 respectively.
 @ifnotinfo
--- a/doc/interpreter/poly.txi
+++ b/doc/interpreter/poly.txi
@@ -34,7 +34,7 @@
  @var{N}
 
 @example
-p(x) = @var{c}(1) x^@var{N} + ... + @var{c}(@var{N}) x + @var{c}(@var{N}+1).
+p(x) = @var{c}(1) x^@var{N} + @dots{} + @var{c}(@var{N}) x + @var{c}(@var{N}+1).
 @end example
 @end ifinfo
 
@@ -54,8 +54,10 @@
 at the point @var{x} very easily, as the following example shows:
 
 @example
+@group
 N = length(c)-1;
 val = dot( x.^(N:-1:0), c );
+@end group
 @end example
 
 @noindent
@@ -111,10 +113,12 @@
 compute the definite integral of @math{p(x) = x^2 + 1} from 0 to 3.
 
 @example
+@group
 c = [1, 0, 1];
 integral = polyint(c);
 area = polyval(integral, 3) - polyval(integral, 0)
 @result{} 12
+@end group
 @end example
 
 @DOCSTRING(polyderiv)
@@ -149,6 +153,7 @@
 on adjoined intervals.
 
 @example
+@group
 x = [-2, -1, 1, 2];
 p = [ 0,  1, 0;
       1, -2, 1;
@@ -157,6 +162,7 @@
 xi = linspace(-2, 2, 50);
 yi = ppval(pp, xi);
 plot(xi, yi);
+@end group
 @end example
 
 @DOCSTRING(ppval)
--- a/scripts/general/interp1.m
+++ b/scripts/general/interp1.m
@@ -31,13 +31,13 @@
 ##
 ## @table @asis
 ## @item 'nearest'
-## Return the nearest neighbour.
+## Return the nearest neighbor.
 ## @item 'linear'
-## Linear interpolation from nearest neighbours
+## Linear interpolation from nearest neighbors
 ## @item 'pchip'
 ## Piece-wise cubic hermite interpolating polynomial
 ## @item 'cubic'
-## Cubic interpolation from four nearest neighbours
+## Cubic interpolation from four nearest neighbors
 ## @item 'spline'
 ## Cubic spline interpolation--smooth first and second derivatives
 ## throughout the curve
--- a/scripts/general/interp3.m
+++ b/scripts/general/interp3.m
@@ -43,11 +43,11 @@
 ##
 ## @table @asis
 ## @item 'nearest'
-## Return the nearest neighbour.
+## Return the nearest neighbor.
 ## @item 'linear'
-## Linear interpolation from nearest neighbours.
+## Linear interpolation from nearest neighbors.
 ## @item 'cubic'
-## Cubic interpolation from four nearest neighbours (not implemented yet).
+## Cubic interpolation from four nearest neighbors (not implemented yet).
 ## @item 'spline'
 ## Cubic spline interpolation--smooth first and second derivatives
 ## throughout the curve.
--- a/scripts/general/interpn.m
+++ b/scripts/general/interpn.m
@@ -43,11 +43,11 @@
 ##
 ## @table @asis
 ## @item 'nearest'
-## Return the nearest neighbour.
+## Return the nearest neighbor.
 ## @item 'linear'
-## Linear interpolation from nearest neighbours.
+## Linear interpolation from nearest neighbors.
 ## @item 'cubic'
-## Cubic interpolation from four nearest neighbours (not implemented yet).
+## Cubic interpolation from four nearest neighbors (not implemented yet).
 ## @item 'spline'
 ## Cubic spline interpolation--smooth first and second derivatives
 ## throughout the curve.
--- a/scripts/geometry/delaunay.m
+++ b/scripts/geometry/delaunay.m
@@ -21,8 +21,8 @@
 ## @deftypefnx {Function File} {@var{tri} =} delaunay (@var{x}, @var{y}, @var{opt})
 ## The return matrix of size [n, 3] contains a set triangles which are
 ## described by the indices to the data point x and y vector.
-## The triangulation satisfies the Delaunay circumcircle criterion.
-## No other data point is in the circumcircle of the defining triangle.
+## The triangulation satisfies the Delaunay circum-circle criterion.
+## No other data point is in the circum-circle of the defining triangle.
 ##
 ## A third optional argument, which must be a string, contains extra options
 ## passed to the underlying qhull command.  See the documentation for the 
--- a/scripts/geometry/tsearchn.m
+++ b/scripts/geometry/tsearchn.m
@@ -21,7 +21,7 @@
 ## Searches for the enclosing Delaunay convex hull.  For @code{@var{t} =
 ## delaunayn (@var{x})}, finds the index in @var{t} containing the
 ## points @var{xi}.  For points outside the convex hull, @var{idx} is NaN.
-## If requested @code{tsearchn} also returns the barycentric coordinates @var{p}
+## If requested @code{tsearchn} also returns the Barycentric coordinates @var{p}
 ## of the enclosing triangles.
 ## @seealso{delaunay, delaunayn}
 ## @end deftypefn
--- a/scripts/polynomial/convn.m
+++ b/scripts/polynomial/convn.m
@@ -26,7 +26,7 @@
 ## @table @asis
 ## @item "full"
 ## The full convolution result is returned.  The size out of the output is
-## @code{size (@var{a}) + size (@var{b})-1}.  This is the default behaviour.
+## @code{size (@var{a}) + size (@var{b})-1}.  This is the default behavior.
 ## @item "same"
 ## The central part of the convolution result is returned.  The size out of the
 ## output is the same as @var{a}.
--- a/scripts/polynomial/mpoles.m
+++ b/scripts/polynomial/mpoles.m
@@ -20,7 +20,7 @@
 ## @deftypefn {Function File} {[@var{multp}, @var{indx}] =} mpoles (@var{p})
 ## @deftypefnx {Function File} {[@var{multp}, @var{indx}] =} mpoles (@var{p}, @var{tol})
 ## @deftypefnx {Function File} {[@var{multp}, @var{indx}] =} mpoles (@var{p}, @var{tol}, @var{reorder})
-## Identifiy unique poles in @var{p} and associates their multiplicity,
+## Identify unique poles in @var{p} and associates their multiplicity,
 ## ordering them from largest to smallest.
 ## 
 ## If the relative difference of the poles is less than @var{tol}, then
@@ -30,7 +30,7 @@
 ## If the optional parameter @var{reorder} is zero, poles are not sorted.
 ##
 ## The value @var{multp} is a vector specifying the multiplicity of the
-## poles.  @var{multp}(:) refers to mulitplicity of @var{p}(@var{indx}(:)).
+## poles.  @var{multp}(:) refers to multiplicity of @var{p}(@var{indx}(:)).
 ##
 ## For example,
 ##