create a plot of a certain aspect of an interpolation structure - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Package : Numerical Analysis : Visualization : Student/NumericalAnalysis/Draw

Student[NumericalAnalysis][Draw] - create a plot of a certain aspect of an interpolation structure

 Calling Sequence Draw(p, opts)

Parameters

 p - a POLYINTERP structure opts - (optional) equation(s) of the form keyword=value where keyword is objects; objects to plot

Description

 • The Draw command plots different components of an interpolation structure.
 • By default, the Draw command plots the following objects: the data points, the approximate polynomial, the function, and the extrapolated points, as long as they are available.
 • If the option objects is provided, the Draw command will plot the specified objects.
 • The POLYINTERP structure is created using the PolynomialInterpolation command or the CubicSpline command.
 • The colors of each object in the plot can be specified using the SetColors mechanism.

Examples

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{NumericalAnalysis}]\right):$
 > $\mathrm{xy}:=\left[\left[0,1\right],\left[\frac{1}{2},1\right],\left[1,\frac{11}{10}\right],\left[\frac{3}{2},\frac{3}{4}\right],\left[2,\frac{7}{8}\right],\left[\frac{5}{2},\frac{9}{10}\right],\left[3,\frac{11}{10}\right],\left[\frac{7}{2},1\right]\right]$
 ${\mathrm{xy}}{:=}\left[\left[{0}{,}{1}\right]{,}\left[\frac{{1}}{{2}}{,}{1}\right]{,}\left[{1}{,}\frac{{11}}{{10}}\right]{,}\left[\frac{{3}}{{2}}{,}\frac{{3}}{{4}}\right]{,}\left[{2}{,}\frac{{7}}{{8}}\right]{,}\left[\frac{{5}}{{2}}{,}\frac{{9}}{{10}}\right]{,}\left[{3}{,}\frac{{11}}{{10}}\right]{,}\left[\frac{{7}}{{2}}{,}{1}\right]\right]$ (1)
 > $\mathrm{p1}:=\mathrm{PolynomialInterpolation}\left(\mathrm{xy},\mathrm{independentvar}='x',\mathrm{method}=\mathrm{lagrange}\right):$
 > $\mathrm{Draw}\left(\mathrm{p1}\right)$
 > $\mathrm{p2}:=\mathrm{CubicSpline}\left(\mathrm{xy},\mathrm{independentvar}='x'\right):$
 > $\mathrm{Draw}\left(\mathrm{p2}\right)$
 > $\mathrm{Draw}\left(\mathrm{p1},\mathrm{objects}='\mathrm{BasisFunctions}'\right)$

## Was this information helpful?

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