Forum archive 2000-2006

Michael Gage - cubic_spline

Michael Gage - cubic_spline

by Arnold Pizer -
Number of replies: 0
inactiveTopiccubic_spline topic started 8/28/2001; 8:28:39 PM
last post 8/28/2001; 8:28:39 PM
userMichael Gage - cubic_spline  blueArrow
8/28/2001; 8:28:39 PM (reads: 840, responses: 0)

cubic_spline

Description
Produces a reference to a subroutine which evaluates a C^2 piecewise cubic polynomial passing through the specified points : (x0,y0), ...

Syntax

$spline = cubic_spline([$x0,$x1...],[$y0,$y1...]);
$y = &$spline(34);
yields the y value at 34.

Params

References to two arrays, specifying respectively the x, y values to be interpolated by the Hermite polynomial. All of the parameters are required. There are no defaults. The x values must be strictly increasing.

Returns

A reference to a function of one variable representing the polynomial. The domain of the function is the closed interval spanned by the x values used in its definition.

Notes

Cubic splines are often used to represent numerical data.

This subroutine is defined in PGnumericalmacros.pl.

See Also

hermite_spline, Hermite.pm, javaScript_cubic_spline

 

<| Post or View Comments |>