Mercurial > hg > octave-kai
changeset 8602:827f0285a201
spline.m doc fix
author | carlo@guglielmo.local |
---|---|
date | Tue, 27 Jan 2009 12:48:34 -0500 |
parents | b297b86f4ad9 |
children | 4c68e26e3ba1 |
files | scripts/ChangeLog scripts/polynomial/spline.m |
diffstat | 2 files changed, 16 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-01-27 Carlo de Falco <kingcrimson@tsicali.it> + + * polynomial/spline.m: Doc fix. + 2009-01-27 Søren Hauberg <hauberg@gmail.com> * general/gradient.m: Handle computing the gradient of a function
--- a/scripts/polynomial/spline.m +++ b/scripts/polynomial/spline.m @@ -21,18 +21,22 @@ ## @deftypefn {Function File} {@var{pp} =} spline (@var{x}, @var{y}) ## @deftypefnx {Function File} {@var{yi} =} spline (@var{x}, @var{y}, @var{xi}) ## -## Returns the cubic spline interpolation of @var{y} at the point -## @var{x}. Called with two arguments the piece-wise polynomial @var{pp} -## that may later be used with @code{ppval} to evaluate the polynomial -## at specific points. +## Return the cubic spline interpolant of @var{y} at points @var{x}. +## If called with two arguments, @code{spline} returns the piece-wise +## 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 +## spline at the points @var{xi}. There is an equivalence +## between @code{ppval (spline (@var{x}, @var{y}), @var{xi})} and +## @code{spline (@var{x}, @var{y}, @var{xi})}. ## ## The variable @var{x} must be a vector of length @var{n}, and @var{y} ## can be either a vector or array. In the case where @var{y} is a ## vector, it can have a length of either @var{n} or @code{@var{n} + 2}. ## If the length of @var{y} is @var{n}, then the 'not-a-knot' end ## condition is used. If the length of @var{y} is @code{@var{n} + 2}, -## then the first and last values of the vector @var{y} are the first -## derivative of the cubic spline at the end-points. +## then the first and last values of the vector @var{y} are the values +## of the first derivative of the cubic spline at the end-points. ## ## If @var{y} is an array, then the size of @var{y} must have the form ## @iftex @@ -52,7 +56,7 @@ ## @ifnottex ## @code{[@var{s1}, @var{s2}, @dots{}, @var{sk}, @var{n} + 2]}. ## @end ifnottex -## The array is then reshaped internally to a matrix where to leading +## The array is then reshaped internally to a matrix where the leading ## dimension is given by ## @iftex ## @tex @@ -62,15 +66,9 @@ ## @ifnottex ## @code{@var{s1} * @var{s2} * @dots{} * @var{sk}} ## @end ifnottex -## and each row this matrix is then treated separately. Note that this +## and each row of this matrix is then treated separately. Note that this ## is exactly the opposite treatment than @code{interp1} and is done ## for compatibility. -## -## Called with a third input argument, @code{spline} evaluates the -## piece-wise spline at the points @var{xi}. There is an equivalence -## between @code{ppval (spline (@var{x}, @var{y}), @var{xi})} and -## @code{spline (@var{x}, @var{y}, @var{xi})}. -## ## @seealso{ppval, mkpp, unmkpp} ## @end deftypefn