parabolaSlopes: Estimate the slope of an interpolating function using a...

parabolaSlopesR Documentation

Estimate the slope of an interpolating function using a parabola

Description

Returns estimates of the slope of an interpolating function that runs through a set of points in the xy-plane.

Usage

 
     parabolaSlopes(x,y)

Arguments

x, y

coordinates of points defining the interpolating function.

Value

Returns an estimate of the slope of the interpolant at (x,y).

Note

This function is used as part of the Stineman interpolation function stinterp. It is rarely called directly by the user, and checking of x and y must be performed by the calling function.

The parabola method provides a better approximation of the slope for smooth functions than the original method suggested by Stineman (1980), which is provided by the function stinemanSlopes (see the documentation of the function stinterp for further information), but it results in higher slopes near abrupt steps or spikes and can lead to some overshooting where Stineman's method does not.

Author(s)

Norbert Nemec, Institute of Theoretical Physics, University of Regensburg. Translation from Python code by Halldor Bjornsson

See Also

stinterp and stinemanSlopes.

Examples

x <- seq(0,2*pi,by=pi/6)
y <- sin(x)
## Not run: parabolaSlopes(x,y)

stinepack documentation built on May 29, 2024, 8:15 a.m.