ftcurv calculates an interpolatory spline through a sequence of functional values. ftcurv is in the Fitgrid package -- a package containing 1D and 2D interpolators using cubic splines under tension.
function ftcurv( xi[*] : float, yi[*] : float, xo[*] : float )
Control parameters that apply to ftcurv are: sig, sl1, sln, sf1.
The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 50) result in nearly a polygonal line. A typical value is 1. (the default).
The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.
The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1
You can extrapolate values with ftcurv (that is calculate interpolated values for abscissae outside of the domain of the input), but these values are, in general, unreliable.
begin xi = (/ 0.00, 2.00, 5.00, 8.00, 10.00, 13.00, \ 15.00, 18.00, 21.00, 23.00, 30.00 /) yi = (/ 1.00, 0.81, 0.00, -0.81, -1.00, -0.84, \ -0.56, 0.04, 0.73, 1.18, 2.0 /) npts = 201 xo = fspan(0.,30.,npts) yo = ftcurv(xi, yi, xo) end
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?