File: pattern.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 (114 lines) | stat: -rw-r--r-- 3,867 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<HTML>
<HEAD>
<TITLE>PATTERN</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><font size="+3" color="green"><B>PATTERN</B></font></P>

<TABLE border="1" cols="2" frame="box" rules="all" width="572">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%" valign="top"><CODE>
GRID\PATTERN x y z m<BR />
GRID\PATTERN\XYOUT x y z m xout yout</CODE>
</TD></TR>
<TR>
<TD valign="top"><B>Qualifiers</B>:</TD>
<TD valign="top"><CODE>\XYOUT</CODE></TD></TR>
<TR>
<TD valign="top"><B>Defaults</B>:</TD>
<TD valign="top"><CODE>\-XYOUT</CODE></TD></TR>
</TABLE>
<P>
 Suppose the vectors <CODE>x</CODE> and <CODE>y</CODE> have length <CODE>h</CODE>, and suppose that for some
 <CODE>n1</CODE> and <CODE>n2</CODE>, <CODE>x</CODE> and <CODE>y</CODE> have the following pattern:</p>
<p>
 <TABLE>
 <TR>
 <TD><CODE>x[1]</CODE></TD>
 <TD><CODE>= x[2]</CODE></TD>
 <TD><CODE>= ... = x[n2],</CODE></TD>
 </TR><TR>
 <TD><CODE>x[n2+1]</CODE></TD>
 <TD><CODE>= x[n2+2]</CODE></TD>
 <TD><CODE>= ... = x[n2+n2],</CODE></TD>
 </TR><TR>
 <TD><CODE>......</CODE></TD><TD></TD><TD></TD>
 </TR><TR>
 <TD><CODE>x[(n1-1)*n2+1]</CODE></TD>
 <TD><CODE>= x[(n1-1)*n2+2]</CODE></TD>
 <TD><CODE>= ... = x[n1*n2]</CODE></TD>
 </TR><TR>
 <TD><CODE>y[1]</CODE></TR>
 <TD><CODE>= y[n2+1]</CODE></TD>
 <TD><CODE>= ... = y[(n1-1)*n2+1],</CODE></TD>
 </TR><TR>
 <TD><CODE>y[2]</CODE></TD>
 <TD><CODE>= y[n2+2]</CODE></TD>
 <TD><CODE>= ... = y[(n1-1)*n2+2],</CODE></TD>
 </TR><TR>
 <TD><CODE>......</CODE></TD><TD></TD><TD></TD>
 </TR><TR>
 <TD><CODE>y[n2]</CODE></TD>
 <TD><CODE>= y[n2+n2]</CODE></TD>
 <TD><CODE>= ... = y[n1*n2]</CODE></TD>
 </TR>
 </TABLE></p>
<P>
 where <CODE>h = n1*n2</CODE>. If the <CODE>x</CODE> and <CODE>y</CODE> vectors have this form,
 the matrix is constructed, without interpolation, with <CODE>n2</CODE> rows and <CODE>n1</CODE>
 columns, i.e., <CODE>m[i,j]=z[k]</CODE> where <CODE>k=j+(i-1)*n1</CODE> for <CODE>i=1,2,...,n2</CODE> and for
 <CODE>j=1,2,...,n1</CODE>.</P>
<P>
 <font size="+1" color="green">XYOUT</font></P>
<p>
 <TABLE border="1" cols="2" frame="box" rules="all" width="572">
 <TR>
 <TD width="15%" valign="top"><B>Syntax</B>:</TD>
 <TD width="85%" valign="top"><CODE>
 GRID\PATTERN\XYOUT x y z m xout yout</CODE>
 </TD></TR>
 </TABLE></p>
<P>
 If output vectors, <CODE>xout</CODE> and <CODE>yout</CODE>, are desired, you must use the
 <CODE>\XYOUT</CODE> qualifier. The coordinates of output
 matrix element <CODE>m[i,j]</CODE> will be
 <CODE>(xout[j],yout[i])</CODE>, where <CODE>xout</CODE> contains the <i>x</i>-coordinates
 of each column and <CODE>yout</CODE> contains the <i>y</i>-coordinates of each row. If the output
 matrix has <CODE>n1</CODE> columns and <CODE>n2</CODE> rows, then the length of <CODE>xout</CODE> will be
 <CODE>n1</CODE> and the length of <CODE>yout</CODE> will be <CODE>n2</CODE>.</P>
<P>
 <CODE>xout = [ x[1]; x[n2+1]; ...; x[(n1-1)*n2+1] ]</CODE><BR />
 <CODE>yout = [ y[1]; y[2]; ...; y[n2] ]</CODE></P>
<P>
 <font size="+1" color="green">Example</font></P>
<p>
 <table>
 <tr>
 <td>Suppose:</td>
 <td><CODE>X = [ 1; 1; 1; 1; 2; 2; 2; 2; 3; &nbsp;3; &nbsp;3; &nbsp;3 ]</CODE></td>
 </tr><tr>
 <td></td>
 <td><CODE>Y = [ 1; 2; 3; 4; 1; 2; 3; 4; 1; &nbsp;2; &nbsp;3; &nbsp;4 ]</CODE></td>
 </tr><tr>
 <td></td>
 <td><CODE>Z = [ 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12 ]</CODE></td>
 </tr>
 </table></p>
<p>
  After the command: <CODE><font color="blue">GRID\PATTERN\XYOUT X Y Z M XOUT YOUT</font></CODE></p>
<p>
 <pre>
      | 1  5   9 |
 M =  | 2  6  10 |, XOUT = [ 1; 2; 3 ], YOUT = [ 1; 2; 3; 4 ]
      | 3  7  11 |
      | 4  8  12 |
 </pre></p>
<P>
 <a href="interpolate.htm"><img src="../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">INTERPOLATE</font></a><br />
 <a href="indices.htm"><img src="../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">INDICES</font></a></P>
</BODY>
</HTML>