# HG changeset patch # User address@hidden # Date 1232038133 0 # Node ID 6174c28970be9808014b4d694102870ea117983b # Parent 937921654627c571a85c697bad2e90f73f60b421 spline.m doc fix diff -r 937921654627 -r 6174c28970be scripts/ChangeLog --- a/scripts/ChangeLog Thu Jan 15 07:22:24 2009 +0100 +++ b/scripts/ChangeLog Thu Jan 15 16:48:53 2009 +0000 @@ -1,3 +1,7 @@ +2009-01-15 Carlo de Falco + + * polynomial/spline.m: Doc fix. + 2009-01-15 Peter L. Søndergaard * general/nargoutchk.m: Doc fix. diff -r 937921654627 -r 6174c28970be scripts/polynomial/spline.m --- a/scripts/polynomial/spline.m Thu Jan 15 07:22:24 2009 +0100 +++ b/scripts/polynomial/spline.m Thu Jan 15 16:48:53 2009 +0000 @@ -21,17 +21,23 @@ ## @deftypefn {Function File} address@hidden =} spline (@var{x}, @var{y}) ## @deftypefnx {Function File} address@hidden =} 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} +## Returns 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 @address@hidden + 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 @address@hidden + 2}, -## then the first and last values of the vector @var{y} are the first +## 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 @@ -52,7 +58,7 @@ ## @ifnottex ## @address@hidden, @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,14 +68,10 @@ ## @ifnottex ## @address@hidden * @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