Appendix
A-9: Graphing
|
Example A-9.8
|
|
Graph a polygonal line through the points .
|
|
|
|
Solution
|
|
|
Interactive Solutions
|
|
To obtain Figure A-9.8(a) interactively, create a degree-one spline via the Curve Fitting Assistant.
•
|
Type the list of points
|
•
|
Context Panel:
Curve Fitting≻Interactive Curve Fitting≻x (as variable)
Splines≻ Degree of the spline: 1
Plot
On 'Done" return Plot
(See Figure A-9.8(b).)
|
|
>
|
p1:=plot([[1, 2], [3, 7], [4, -2]],style=line,color=red):
p2:=plot([[1, 2], [3, 7], [4, -2]],style=point,color=black,symbol=solidcircle,symbolsize=20):
plots[display](p1,p2);
|
|
Figure A-9.8(a) Polygonal line through given points
|
|
|
|
|
|
|
Figure A-9.8(b) Use of the Curve Fitting Assistant to obtain a polygonal line as a degree-one spline
|
|
|
Although the Curve Fitting Assistant is most easily launched from the Context Panel, to launch it for this example you can also press:
.
|
|
Coded Solution
|
|
•
|
Enter the list of points.
|
|
>
|
|
|
•
|
Graph the polygonal line through the points.
|
|
>
|
|
|
|
>
|
|
|
•
|
Combine the graphs of the polygonal line and the points.
|
|
>
|
|
|
|
|
The display command in the plots package merges any two or more plot data-structures.
|
|
|
<< Previous Example Section A-9
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
|