Forum archive 2000-2006

Michael Gage - hermite_spline

Michael Gage - hermite_spline

by Arnold Pizer -
Number of replies: 0
inactiveTopichermite_spline topic started 8/28/2001; 8:27:12 PM
last post 8/28/2001; 8:27:12 PM
userMichael Gage - hermite_spline  blueArrow
8/28/2001; 8:27:12 PM (reads: 2119, responses: 0)

hermite_spline

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

The spline is more stable than the high degree hermite polynomial generated by hermite. Hermite splines objects are also available in Hermite.pm and will be more versatile for most graphing purposes.

Syntax

$poly = hermit_spline([$x0,$x1...],[$y0,$y1...],[$yp0,$yp1,...]);
$y = &$poly(34);
yields the y value at 34.

Params

References to three arrays, specifying respectively the x, y and 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

The Hermite polynomial objects give the most versatile version of Hermite spline approximation. Except in rare cases they are likely to be the most appropriate choice for specifying graphs. The function hermite produces a reference to a high degree polynomial interpolating specified points and slopes.

This subroutine is defined in PGnumericalmacros.pl.

See Also

hermite, Hermite.pm, cubic_spline

 

<| Post or View Comments |>