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
|
<HTML>
<HEAD>
<TITLE>INDICES</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<P><font size="+3" color="green"><B>INDICES</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\INDICES x y z m<BR />
GRID\INDICES\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>
The vectors <CODE>x</CODE> and <CODE>y</CODE> are assumed to contain index locations for the
<CODE>z</CODE> data values. Suppose that <CODE>h=min(len(x),len(y),len(z)),
nc=max(x[i]), nr=max(y[i])</CODE> for <CODE>i=1,2,...,h</CODE>.
Then <CODE>m[i,j]=0</CODE> for <CODE>i=1,2,...,nr; j=1,2,...,nc</CODE> except
<CODE>m[y[i],x[i]]=z[i]</CODE> for <CODE>i=1,2,...,h</CODE> and <CODE>m</CODE> will
have <CODE>nr</CODE> rows and <CODE>nc</CODE> columns.</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\INDICES\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>nc</CODE> columns and
<CODE>nr</CODE> rows, then <CODE>xout = [1:nc]</CODE> and
<CODE>yout = [1:nr]</CODE>.</P>
<P>
<font size="+1" color="green">Example</font></P>
<table>
<tr>
<td>Suppose:</td>
<td><CODE>X = [ 1; 4; 1; 3; 5 ]</CODE></td>
</tr><tr>
<td></td>
<td><CODE>Y = [ 2; 1; 6; 4; 6 ]</CODE></td>
</tr><tr>
<td></td>
<td><CODE>Z = [ 10; 15; 20; 25; 30 ]</CODE></td>
</tr>
</table></p>
<p>
After the command: <CODE><font color="blue">GRID\INDICES X Y Z M</font></CODE></p>
<p>
<pre>
| 0, 0, 0, 15, 0 |
| 10, 0, 0, 0, 0 |
M = | 0, 0, 0, 0, 0 |
| 0, 0, 25, 0, 0 |
| 0, 0, 0, 0, 0 |
| 20, 0, 0, 0, 30 |
</pre>
<P>
<a href="pattern.htm"><img src="../shadow_left.gif">
<font size="+1" color="olive">PATTERN</font></a></P>
</BODY>
</HTML>
|