INDICES

Syntax: | `GRID\INDICES x y z m GRID\INDICES\XYOUT x y z m xout yout`
Qualifiers: | `\XYOUT`
Defaults: | `\-XYOUT`

The vectors `x` and `y` are assumed to contain index locations for the `z` data values. Suppose that `h=min(len(x),len(y),len(z)), nc=max(x[i]), nr=max(y[i])` for `i=1,2,...,h`. Then `m[i,j]=0` for `i=1,2,...,nr; j=1,2,...,nc` except `m[y[i],x[i]]=z[i]` for `i=1,2,...,h` and `m` will have `nr` rows and `nc` columns.

XYOUT

Syntax: | `GRID\INDICES\XYOUT x y z m xout yout`

If output vectors, `xout` and `yout`, are desired, you must use the `\XYOUT` qualifier. The coordinates of output matrix element `m[i,j]` will be `(xout[j],yout[i])`, where `xout` contains the x-coordinates of each column and `yout` contains the y-coordinates of each row. If the output matrix has `nc` columns and `nr` rows, then `xout = [1:nc]` and `yout = [1:nr]`.

Example

Suppose: | `X = [ 1; 4; 1; 3; 5 ]`
| `Y = [ 2; 1; 6; 4; 6 ]`
| `Z = [ 10; 15; 20; 25; 30 ]`

After the command: `GRID\INDICES X Y Z M`

                 |  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 |

PATTERN