Student[NumericalAnalysis]
AddPoint
return an interpolated polynomial structure with a newly added point
Calling Sequence
Parameters
Description
Notes
Examples
AddPoint(p, pts)
AddPoint(p, pts, bcs)
p
-
a POLYINTERP structure
pts
numeric, list(numeric, numeric), list(numeric, numeric,numeric); the new data point (node) to be added
bcs
list(numeric, numeric); new boundary conditions for an interpolating polynomial created using the cubic spline method
The AddPoint command takes the point(s) to be added and recomputes the interpolated polynomial from p with the new point(s) and returns the adjusted POLYINTERP structure.
This command is convenient because it prevents you from having to reenter all previous options and data with the new point into the PolynomialInterpolation command or the CubicSpline command to create a new POLYINTERP structure.
If the POLYINTERP structure was created using the CubicSpline command and the boundary conditions are not natural, then new boundary conditions bcs at the end points must be specified.
This procedure operates numerically; that is, inputs that are not numeric are first evaluated to floating-point numbers before computations proceed.
with⁡StudentNumericalAnalysis:
xy≔1.0,0.7651977,1.3,0.6200860,1.6,0.4554022,1.9,0.2818186
p2≔PolynomialInterpolation⁡xy,method=neville,extrapolate=1.5:
NevilleTable⁡p2,1.5
0.76519770000.62008600.5233448671000.45540220.51029680020.512471478100.28181860.51326340020.51128566690.5118126939
Add another node.
p2a≔AddPoint⁡p2,2.2,0.1103623:
The Neville Table now has another row.
NevilleTable⁡p2a,1.5
0.765197700000.62008600.52334486710000.45540220.51029680020.5124714781000.28181860.51326340020.51128566690.511812693900.11036230.51042700020.51373613360.51183021490.5118199942
See Also
Student[NumericalAnalysis][BasisFunctions]
Student[NumericalAnalysis][ComputationOverview]
Student[NumericalAnalysis][CubicSpline]
Student[NumericalAnalysis][DividedDifferenceTable]
Student[NumericalAnalysis][InterpolantRemainderTerm]
Student[NumericalAnalysis][NevilleTable]
Student[NumericalAnalysis][PolynomialInterpolation]
Download Help Document