File: basicexample.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (46 lines) | stat: -rw-r--r-- 1,297 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<HTML>
<HEAD>
<TITLE>A basic example</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><font size="+2" color="green">A basic example</font></P>
<P>
 Let's start with a graph of vector <code>Y</code> versus vector
 <code>X</code>, using all the program defaults.  First we generate
 some 'data', then set up the automatic axis labels and then draw the graph.</P>
<P>
 <font color="blue"><PRE>
 PI = ACOS(-1)
 X = [1:180:2]*PI/180
 Y = SIN(X)
 SET XLABEL 'X (Radians)'
 SET YLABEL 'SIN(X)'
 GRAPH X Y
 </PRE></font>
</p>
<p>
 <center><IMG SRC="basic-graph.gif"></center></p>
<P>
 Now consider the following commands, which produce two graphs in seperate windows.</P>
<P>
 <font color="blue"><PRE>
 WINDOW 5
 SET XLABEL 'cosh(x)+sin(1/(.1+x&lt;^&gt;2&lt;_&gt;)) vs. x'
 X=[0:3:.01]
 GRAPH X COSH(X)+SIN(1/(.1+X^2))
 WINDOW 7
 SET XLABEL 'x*cos(x)  vs.  x*sin(x)'
 X=[0:19*PI:.5]*2.55555
 GRAPH SIN(X)*X COS(X)*X
 </PRE></font></p>
<p>
 <center><IMG SRC="sincos.gif"></center></p>
<P>
 <a href="fillareacurve.htm"><img src="../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Fill the area under a curve</font></a><br />
 <a href="scripttoplot.htm"><img src="../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">A script to plot a curve with axes</font></a>
</P>
</BODY>
</HTML>