-
Notifications
You must be signed in to change notification settings - Fork 46
spline
Fabian Kindermann edited this page Apr 2, 2021
·
12 revisions
function spline(x, yi, left, right, growth)
This function interpolates the data that is located on either an equidistant grid of nodes or one with nodes of growing distance , see grid_Cons_Equi or grid_Cons_Grow. It therefore uses a piecewise third order polynomial or spline function. Note that this function can interpolate data from one up to seven dimensions. If interpolation data is supplied for more than one dimension, it must be located on a rectilinear grid that is created from the Tensor product of equidistant or growing nodes along each dimension. More specifically, for interpolation in dimension, the interpolation data is
-
real*8 :: x
orreal*8 :: x(:)
The point(s) where to evaluate the interpolating spline. This can be either a scalar or a one-dimensional array of arbitrary size. In the latter case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:)
A one-dimensional array containing the interpolation data at the (equidistant or growing) nodes . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left
The left interval endpoint of the (equidistant or growing) grid . -
real*8 :: right
The right interval endpoint of the (equidistant or growing) grid .
-
real*8 :: growth
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a scalar and a one-dimensional array ifx
is an array.
-
real*8 :: x(2)
orreal*8 :: x(:, 2)
The point(s) where to evaluate the interpolating spline. This can be either a one-dimensional array of length 2, in which case only one point (with coordinates along each of the interpolation dimensions) is supplied. Alternatively, you can supply a two-dimensional array, where the second dimension is again of length 2. In this case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:, :)
A two-dimensional array containing the interpolation data at the (equidistant or growing) node combinations . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left(2)
The left interval endpoint of the (equidistant or growing) grid in each interpolation dimension. -
real*8 :: right(2)
The right interval endpoint of the (equidistant or growing) grid in each interpolation dimension.
-
real*8 :: growth(2)
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate for each dimension through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a one-dimensional array (i.e. it only represents one point) and a one-dimensional array ifx
is a two-dimensional array.
-
real*8 :: x(3)
orreal*8 :: x(:, 3)
The point(s) where to evaluate the interpolating spline. This can be either a one-dimensional array of length 3, in which case only one point (with coordinates along each of the interpolation dimensions) is supplied. Alternatively, you can supply a two-dimensional array, where the second dimension is again of length 3. In this case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:, :, :)
A three-dimensional array containing the interpolation data at the (equidistant or growing) node combinations . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left(3)
The left interval endpoint of the (equidistant or growing) grid in each interpolation dimension. -
real*8 :: right(3)
The right interval endpoint of the (equidistant or growing) grid in each interpolation dimension.
-
real*8 :: growth(3)
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate for each dimension through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a one-dimensional array (i.e. it only represents one point) and a one-dimensional array ifx
is a two-dimensional array.
-
real*8 :: x(4)
orreal*8 :: x(:, 4)
The point(s) where to evaluate the interpolating spline. This can be either a one-dimensional array of length 4, in which case only one point (with coordinates along each of the interpolation dimensions) is supplied. Alternatively, you can supply a two-dimensional array, where the second dimension is again of length 4. In this case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:, :, :, :)
A four-dimensional array containing the interpolation data at the (equidistant or growing) node combinations . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left(4)
The left interval endpoint of the (equidistant or growing) grid in each interpolation dimension. -
real*8 :: right(4)
The right interval endpoint of the (equidistant or growing) grid in each interpolation dimension.
-
real*8 :: growth(4)
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate for each dimension through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a one-dimensional array (i.e. it only represents one point) and a one-dimensional array ifx
is a two-dimensional array.
-
real*8 :: x(5)
orreal*8 :: x(:, 5)
The point(s) where to evaluate the interpolating spline. This can be either a one-dimensional array of length 5, in which case only one point (with coordinates along each of the interpolation dimensions) is supplied. Alternatively, you can supply a two-dimensional array, where the second dimension is again of length 5. In this case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:, :, :, :, :)
A five-dimensional array containing the interpolation data at the (equidistant or growing) node combinations . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left(5)
The left interval endpoint of the (equidistant or growing) grid in each interpolation dimension. -
real*8 :: right(5)
The right interval endpoint of the (equidistant or growing) grid in each interpolation dimension.
-
real*8 :: growth(5)
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate for each dimension through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a one-dimensional array (i.e. it only represents one point) and a one-dimensional array ifx
is a two-dimensional array.
-
real*8 :: x(6)
orreal*8 :: x(:, 6)
The point(s) where to evaluate the interpolating spline. This can be either a one-dimensional array of length 6, in which case only one point (with coordinates along each of the interpolation dimensions) is supplied. Alternatively, you can supply a two-dimensional array, where the second dimension is again of length 6. In this case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:, :, :, :, :, :)
A six-dimensional array containing the interpolation data at the (equidistant or growing) node combinations . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left(6)
The left interval endpoint of the (equidistant or growing) grid in each interpolation dimension. -
real*8 :: right(6)
The right interval endpoint of the (equidistant or growing) grid in each interpolation dimension.
-
real*8 :: growth(6)
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate for each dimension through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a one-dimensional array (i.e. it only represents one point) and a one-dimensional array ifx
is a two-dimensional array.
-
real*8 :: x(7)
orreal*8 :: x(:, 7)
The point(s) where to evaluate the interpolating spline. This can be either a one-dimensional array of length 7, in which case only one point (with coordinates along each of the interpolation dimensions) is supplied. Alternatively, you can supply a two-dimensional array, where the second dimension is again of length 7. In this case, the spline is evaluated at each point supplied in the arrayx
. -
real*8 :: yi(:, :, :, :, :, :, :)
A seven-dimensional array containing the interpolation data at the (equidistant or growing) node combinations . Note that the nodes themselves need not be supplied, but they are rather defined by the input variablesleft
,right
andgrowth
. -
real*8 :: left(7)
The left interval endpoint of the (equidistant or growing) grid in each interpolation dimension. -
real*8 :: right(7)
The right interval endpoint of the (equidistant or growing) grid in each interpolation dimension.
-
real*8 :: growth(7)
If the gridpoints for which the interpolation data are supplied have a growing distance, you can supply the growth rate for each dimension through this optional variable. If nothing is passed to the function, it will assume that the interpolation nodes are equidistant.
-
real*8 :: spline
orreal*8 :: spline(:)
The value of the interpolating spline function at the point(s) supplied inx
. This is a scalar ifx
is a one-dimensional array (i.e. it only represents one point) and a one-dimensional array ifx
is a two-dimensional array.
- For further reading refer to:
- Süli, E. & Mayers, D. F. (2003). An Introduction to Numerical Analysis. Cambridge: Cambridge University Press.
- Powell, M.J.D. (1996). Approximation Theory and Methods. Cambridge: Cambridge University Press.
- Habermann, C. & Kindermann, F. (2007). Multidimensional spline interpolation: Theory and applications. Computational Economics, 30(2), 153-169.