File: BasicTasksS02.htm

package info (click to toggle)
extrema 4.4.4.dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,416 kB
  • ctags: 6,689
  • sloc: cpp: 88,991; sh: 8,229; makefile: 480
file content (32 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (2)
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
<HTML>
<HEAD>
<TITLE>Create and plot an array</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P>
 Create an array <code>x=(2,2.3,2.6,...,4.7,5)</code>.</P>
<P>
 <CODE><font color="blue">x = [2:5:.3]</font></CODE></P>
<P>
 Plot <code>sqrt(x)</code> vs. <code>x</code> as a line plot</P>
<P>
 <CODE><font color="blue">set plotsymbol 0</font></CODE><br />
 <CODE><font color="blue">graph x sqrt(x)</font></CODE></P>
<P>
 <IMG SRC="BasicTasksS02I01.gif"></P>
<P>
 Plot <code>sqrt(x)</code> vs. <code>x</code> with disconnected plot symbols.</P>
<P>
 <CODE><font color="blue">set plotsymbol -1</font></CODE><br />
 <CODE><font color="blue">graph x sqrt(x)</font></CODE></P>
<P>
 <IMG SRC="BasicTasksS02I02.gif"></P>
<P>
  <a href="BasicTasksS01.htm"><img src="../shadow_left.gif">&nbsp;
    <font size="+1" color="olive">Create arrays of numerical values</font></a><br />
  <a href="BasicTasksS03.htm"><img src="../shadow_right.gif">&nbsp;
    <font size="+1" color="olive">Define vectors (1-d arrays)</font></a>
</P>
</BODY>
</HTML>