perform cubic spline interpolation on a set of data - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/CubicSpline

Student[NumericalAnalysis][CubicSpline] - perform cubic spline interpolation on a set of data

Calling Sequence

CubicSpline(xy, opts)

Parameters

xy

-

listlist; data points, in the form [[x_1,y_1],[x_2, y_2],...], to be interpolated

opts

-

(optional) equations of the form keyword=value where keyword is one of: boundaryconditions, digits, extrapolate, function, independentvar; the options for interpolating the data xy

Description

• 

The CubicSpline command interpolates the given data points xy using the cubic spline method and stores all computed information in a POLYINTERP structure.

• 

The POLYINTERP structure is then passed around to different interpolation commands in the Student[NumericalAnalysis] subpackage where information can be extracted from it and, depending on the command, manipulated.

Notes

• 

The CubicSpline command does not compute a remainder term, so it may not be used in conjunction with the RemainderTerm command or the InterpolantRemainderTerm command.

• 

This procedure operates numerically; that is, inputs that are not numeric are first evaluated to floating-point numbers before computations proceed.

Examples

withStudent[NumericalAnalysis]:

xy:=0,4.0,0.5,0,1.0,2.0,1.5,0,2.0,1.0,2.5,0,3.0,0.5

xy:=0,4.0,0.5,0,1.0,2.0,1.5,0,2.0,1.0,2.5,0,3.0,0.5

(1)

p1:=CubicSplinexy,independentvar=x:

expandInterpolantp1

&lcub;4.8.48076923076923x&plus;1.92307692307692x3x<0.55.13461538461539x&plus;3.442307692307696.69230769230769x2&plus;6.38461538461538x3x<1.021.288461538461558.6730769230769x&plus;46.8461538461538x211.4615384615385x3x<1.515.0576923076923x15.57692307692312.30769230769231x20.538461538461538x3x<2.064.8076923076923&plus;88.9038461538461x39.2307692307692x2&plus;5.61538461538461x3x<2.552.4423076923077x&plus;52.9807692307692&plus;17.3076923076923x21.92307692307692x3otherwise

(2)

Drawp1

p2:=CubicSplinexy&comma;independentvar&equals;x&comma;boundaryconditions&equals;clamped0&comma;6&colon;

Drawp2

See Also

Student[NumericalAnalysis], Student[NumericalAnalysis][AddPoint], Student[NumericalAnalysis][BasisFunctions], Student[NumericalAnalysis][ComputationOverview], Student[NumericalAnalysis][DataPoints], Student[NumericalAnalysis][ExactValue], Student[NumericalAnalysis][InterpolantRemainderTerm], Student[NumericalAnalysis][PolynomialInterpolation]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam