File: matrixvariable.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 (43 lines) | stat: -rw-r--r-- 1,634 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
<HTML>
<HEAD>
<TITLE>Matrix variables</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><A NAME="variablematrix"></A>
<font size="+2" color="green">Matrix variables</font></P>
<P>
 A matrix is a two dimensional array of double precision real numbers, with
 rows and columns. The row and column indices of a matrix are separated with
 a comma. The row dimension is specified first. There is no maximum size for
 matrices.</P>
<P>
 A literal matrix can be a list of vectors, such as,
 <code>[[1;2;3];[4;5;6];[7;8;9]]</code>, or an expression that results
 in a matrix, such as <code>[2:5]&gt;&lt;[2:6]</code>.</P>
<P>
 The following table shows the possible ways that
 variables can be considered to be equivalent to matrices, that is, can be
 used wherever matrices are expected.</P>
<p>
 <center><table border="1" width="100%">
 <tr><td bgcolor="#FFCCCC">Let <code>x</code> and <code>y</code> be vectors<br />
  Suppose that <code>M</code> is a matrix</td>
 </tr><tr>
 <td><table cellpadding="2">
 <tr>
 <td><code>M</code></td><td>=</td><td><code>M[i,j]</code> for <code>i=1,...,VLEN(M)[1],
  j=1,...,VLEN(M)[2]</code></td>
 </tr><tr>
 <td valign="top"><code>M[x,y]</code></td><td valign="top">=</td>
  <td><code>M[i,j]</code> for <code>i=x[1],x[2],...,x[#], j=y[1],y[2],...,y[#]</code></td>
 </tr></table></td>
 </tr></table></center></p>
<P>
 <a href="vectorvariable.htm"><img src="../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Vector variables</font></a><br />
 <a href="stringvariable.htm"><img src="../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">String variables</font></a>
</P>
</body>
</html>