# HG changeset patch # User Rik # Date 1295049345 28800 # Node ID 702dbd0c53f5bc8ffb671213cd9ee81e5822cc83 # Parent 440a6b54e6f18a267c88f55412c93b901fb5bed0 Add undocumented ppder, ppint, ppjumps functions to documentation. diff -r 440a6b54e6f1 -r 702dbd0c53f5 doc/ChangeLog --- a/doc/ChangeLog Fri Jan 14 15:29:08 2011 -0800 +++ b/doc/ChangeLog Fri Jan 14 15:55:45 2011 -0800 @@ -1,3 +1,8 @@ +2011-01-14 Rik + + * interpreter/poly.txi: Add undocumented ppder, ppint, ppjumps + functions to documentation. + 2011-01-14 Rik * interpreter/system.txi: Add undocumented matlabroot to documentation. diff -r 440a6b54e6f1 -r 702dbd0c53f5 doc/interpreter/poly.txi --- a/doc/interpreter/poly.txi Fri Jan 14 15:29:08 2011 -0800 +++ b/doc/interpreter/poly.txi Fri Jan 14 15:55:45 2011 -0800 @@ -135,13 +135,13 @@ a single polynomial to some given data points. To avoid a highly fluctuating polynomial, one most often wants to fit a low-order polynomial to data. This usually means that it is necessary to fit the polynomial -in a least-squares sense, which is what the @code{polyfit} function does. +in a least-squares sense, which just is what the @code{polyfit} function does. @DOCSTRING(polyfit) In situations where a single polynomial isn't good enough, a solution is to use several polynomials pieced together. The function @code{mkpp} -creates a piece-wise polynomial, @code{ppval} evaluates the function +creates a piecewise polynomial, @code{ppval} evaluates the function created by @code{mkpp}, and @code{unmkpp} returns detailed information about the function. @@ -162,12 +162,18 @@ @end group @end example -@DOCSTRING(ppval) - @DOCSTRING(mkpp) @DOCSTRING(unmkpp) +@DOCSTRING(ppval) + +@DOCSTRING(ppder) + +@DOCSTRING(ppint) + +@DOCSTRING(ppjumps) + @node Miscellaneous Functions @section Miscellaneous Functions diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/ChangeLog --- a/scripts/ChangeLog Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/ChangeLog Fri Jan 14 15:55:45 2011 -0800 @@ -1,3 +1,10 @@ +2011-01-14 Rik + + * general/interp1.m, general/interp2.m, polynomial/mkpp.m, + polynomial/pchip.m, polynomial/ppder.m, polynomial/ppint.m, + polynomial/ppjumps.m, polynomial/ppval.m, polynomial/spline.m, + polynomial/unmkpp.m: Improve docstrings + 2011-01-14 Rik * miscellaneous/flops.m: Delete function which was unimplemented diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/general/interp1.m --- a/scripts/general/interp1.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/general/interp1.m Fri Jan 14 15:55:45 2011 -0800 @@ -40,7 +40,7 @@ ## Linear interpolation from nearest neighbors ## ## @item 'pchip' -## Piece-wise cubic Hermite interpolating polynomial +## Piecewise cubic Hermite interpolating polynomial ## ## @item 'cubic' ## Cubic interpolation from four nearest neighbors @@ -60,7 +60,7 @@ ## endpoints with that number. If @var{extrap} is missing, assume NA. ## ## If the string argument 'pp' is specified, then @var{xi} should not be -## supplied and @code{interp1} returns the piece-wise polynomial that +## supplied and @code{interp1} returns the piecewise polynomial that ## can later be used with @code{ppval} to evaluate the interpolation. ## There is an equivalence, such that @code{ppval (interp1 (@var{x}, ## @var{y}, @var{method}, 'pp'), @var{xi}) == interp1 (@var{x}, @var{y}, diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/general/interp2.m --- a/scripts/general/interp2.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/general/interp2.m Fri Jan 14 15:55:45 2011 -0800 @@ -59,7 +59,7 @@ ## Linear interpolation from nearest neighbors. ## ## @item 'pchip' -## Piece-wise cubic Hermite interpolating polynomial. +## Piecewise cubic Hermite interpolating polynomial. ## ## @item 'cubic' ## Cubic interpolation from four nearest neighbors. diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/mkpp.m --- a/scripts/polynomial/mkpp.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/mkpp.m Fri Jan 14 15:55:45 2011 -0800 @@ -20,7 +20,7 @@ ## @deftypefn {Function File} {@var{pp} =} mkpp (@var{x}, @var{p}) ## @deftypefnx {Function File} {@var{pp} =} mkpp (@var{x}, @var{p}, @var{d}) ## -## Construct a piece-wise polynomial structure from sample points +## Construct a piecewise polynomial structure from sample points ## @var{x} and coefficients @var{p}. The i-th row of @var{p}, ## @code{@var{p} (@var{i},:)}, contains the coefficients for the polynomial ## over the @var{i}-th interval, ordered from highest to diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/pchip.m --- a/scripts/polynomial/pchip.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/pchip.m Fri Jan 14 15:55:45 2011 -0800 @@ -21,7 +21,7 @@ ## @deftypefnx {Function File} {@var{yi} =} pchip (@var{x}, @var{y}, @var{xi}) ## ## Piecewise Cubic Hermite interpolating polynomial. Called with two -## arguments, the piece-wise polynomial @var{pp} is returned, that may +## arguments, the piecewise polynomial @var{pp} is returned, that may ## later be used with @code{ppval} to evaluate the polynomial at ## specific points. ## @@ -49,7 +49,7 @@ ## for compatibility. ## ## Called with a third input argument, @code{pchip} evaluates the -## piece-wise polynomial at the points @var{xi}. There is an equivalence +## piecewise polynomial at the points @var{xi}. There is an equivalence ## between @code{ppval (pchip (@var{x}, @var{y}), @var{xi})} and ## @code{pchip (@var{x}, @var{y}, @var{xi})}. ## diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/ppder.m --- a/scripts/polynomial/ppder.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/ppder.m Fri Jan 14 15:55:45 2011 -0800 @@ -18,8 +18,8 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{ppd} =} ppder (@var{pp}) -## Computes the piecewise derivative of a piecewise polynomial struct @var{pp}. -## @seealso{mkpp,ppval} +## Compute the piecewise derivative of the piecewise polynomial struct @var{pp}. +## @seealso{mkpp,ppval,ppint} ## @end deftypefn function ppd = ppder (pp) diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/ppint.m --- a/scripts/polynomial/ppint.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/ppint.m Fri Jan 14 15:55:45 2011 -0800 @@ -17,10 +17,11 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} {@var{ppi} =} ppint (@var{pp}, @var{c}) -## Computes the antiderivative of a piecewise polynomial struct @var{pp}. +## @deftypefn {Function File} {@var{ppi} =} ppint (@var{pp}) +## @deftypefnx {Function File} {@var{ppi} =} ppint (@var{pp}, @var{c}) +## Compute the integral of the piecewise polynomial struct @var{pp}. ## @var{c}, if given, is the constant of integration. -## @seealso{mkpp,ppval} +## @seealso{mkpp,ppval,ppder} ## @end deftypefn function ppi = ppint (pp, c) diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/ppjumps.m --- a/scripts/polynomial/ppjumps.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/ppjumps.m Fri Jan 14 15:55:45 2011 -0800 @@ -18,9 +18,10 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{jumps} =} ppjumps (@var{pp}) -## Evaluates the boundary jumps of a piecewise polynomial. -## If there are n intervals, and the dimensionality of pp is d, -## the resulting array has dimensions @code{[d, n-1]}. +## Evaluate the boundary jumps of a piecewise polynomial. +## If there are @math{n} intervals, and the dimensionality of @var{pp} is +## @math{d}, the resulting array has dimensions @code{[d, n-1]}. +## @seealso{mkpp} ## @end deftypefn function jumps = ppjumps (pp) @@ -53,4 +54,3 @@ endfunction - diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/ppval.m --- a/scripts/polynomial/ppval.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/ppval.m Fri Jan 14 15:55:45 2011 -0800 @@ -18,7 +18,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{yi} =} ppval (@var{pp}, @var{xi}) -## Evaluate piece-wise polynomial @var{pp} at the points @var{xi}. +## Evaluate piecewise polynomial @var{pp} at the points @var{xi}. ## If @var{pp} is scalar-valued, the result is an array of the same shape as ## @var{xi}. ## Otherwise, the size of the result is @code{[pp.d, length(@var{xi})]} if diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/spline.m --- a/scripts/polynomial/spline.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/spline.m Fri Jan 14 15:55:45 2011 -0800 @@ -22,7 +22,7 @@ ## @deftypefnx {Function File} {@var{yi} =} spline (@var{x}, @var{y}, @var{xi}) ## ## Return the cubic spline interpolant of @var{y} at points @var{x}. -## If called with two arguments, @code{spline} returns the piece-wise +## If called with two arguments, @code{spline} returns the piecewise ## polynomial @var{pp} that may later be used with @code{ppval} to ## evaluate the polynomial at specific points. ## If called with a third input argument, @code{spline} evaluates the diff -r 440a6b54e6f1 -r 702dbd0c53f5 scripts/polynomial/unmkpp.m --- a/scripts/polynomial/unmkpp.m Fri Jan 14 15:29:08 2011 -0800 +++ b/scripts/polynomial/unmkpp.m Fri Jan 14 15:55:45 2011 -0800 @@ -19,7 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{x}, @var{p}, @var{n}, @var{k}, @var{d}] =} unmkpp (@var{pp}) ## -## Extract the components of a piece-wise polynomial structure @var{pp}. +## Extract the components of a piecewise polynomial structure @var{pp}. ## These are as follows: ## ## @table @asis