Mercurial > hg > octave-nkf
comparison scripts/polynomial/spline.m @ 5837:55404f3b0da1
[project @ 2006-06-01 19:05:31 by jwe]
author | jwe |
---|---|
date | Thu, 01 Jun 2006 19:05:32 +0000 |
parents | 448f9982e7fb |
children | 376e02b2ce70 |
comparison
equal
deleted
inserted
replaced
5836:ed69a3b5b3d0 | 5837:55404f3b0da1 |
---|---|
21 ## -*- texinfo -*- | 21 ## -*- texinfo -*- |
22 ## @deftypefn {Function File} {@var{pp} = } spline (@var{x}, @var{y}) | 22 ## @deftypefn {Function File} {@var{pp} = } spline (@var{x}, @var{y}) |
23 ## @deftypefnx {Function File} {@var{yi} = } spline (@var{x}, @var{y}, @var{xi}) | 23 ## @deftypefnx {Function File} {@var{yi} = } spline (@var{x}, @var{y}, @var{xi}) |
24 ## | 24 ## |
25 ## Returns the cubic spline interpolation of @var{y} at the point | 25 ## Returns the cubic spline interpolation of @var{y} at the point |
26 ## @var{x}. Called with two arguments the piece-wse polynomial @var{pp} | 26 ## @var{x}. Called with two arguments the piece-wise polynomial @var{pp} |
27 ## that may later be used with @code{ppval} to evaluate the polynomial | 27 ## that may later be used with @code{ppval} to evaluate the polynomial |
28 ## at specific points. | 28 ## at specific points. |
29 ## | 29 ## |
30 ## The variable @var{x} must be a vector of length @var{n}, and @var{y} | 30 ## The variable @var{x} must be a vector of length @var{n}, and @var{y} |
31 ## can be either a vector of array. In the case where @var{y} is a | 31 ## can be either a vector or array. In the case where @var{y} is a |
32 ## vector, it can have a length of either @var{n} or @code{@var{n} + 2}. | 32 ## vector, it can have a length of either @var{n} or @code{@var{n} + 2}. |
33 ## If the length of @var{y} is @var{n}, then the 'not-a-knot' end | 33 ## If the length of @var{y} is @var{n}, then the 'not-a-knot' end |
34 ## condition is used. If the length of @var{y} is @code{@var{n} + 2}, | 34 ## condition is used. If the length of @var{y} is @code{@var{n} + 2}, |
35 ## then the first and last values of the vector @var{y} are the first | 35 ## then the first and last values of the vector @var{y} are the first |
36 ## derivative of the cubic spline at the end-points. | 36 ## derivative of the cubic spline at the end-points. |