BIN2D
Syntax: BIN2D x y xbin ybin mc nx ny { xmin xmax ymin ymax }
BIN2D\WEIGHTS w x y xbin ybin mc nx ny { xmin xmax ymin ymax }
The lengths of x and y must be equal. If a weight vector, w, is supplied,
it must also be the same length. The vectors xbin and ybin and the matrix
mc will be created. xbin will contain |nx| elements, ybin will contain
|ny| elements, and matrix mc will contain |nx| columns and |ny| rows.
\XDISCARD - events outside the range xmin to xmax are discarded
\YDISCARD - events outside the range ymin to ymax are discarded
\DISCARD - both x and y extreme events will be discarded
By default, events below xmin are placed in the first bin column and
events above xmax are placed in the last bin column, as well as events
below ymin are placed in the first bin row events above ymax are placed
in the last bin row
Syntax: BIN2D\WEIGHTS w x y xbin ybin mc nx ny { xmin xmax ymin ymax }
If a weight, w, is entered, you must indicate that it is there by using
the \WEIGHTS qualifier. The weight should be a vector. The i_th event
causes the bin count to be incremented by w[i]. \WEIGHTS cannot be used
with \MATRIX.
If the \EMPTY qualifier is used then an event is counted in a bin only
if that bin is empty. So only the first event encountered for each bin
will be counted in that bin. \EMPTY cannot be used with \MATRIX.
BIN2D\MATRIX mdata mxin myin mout
The BIN2D\MATRIX command calculates the sum of the data points, mdata,
within a set of boxes. The x coordinates of the boxes are given in matrix
mxin, the y coordinates are given in matrix myin, mxin and myin must be
the same size. A data point is taken to be inside a box if it is interior
or on an edge. Each data point is considered only once, so a data point
is never taken to be in more than one of the boxes. The coordinates of
the data points are the row and column indices, e.g., mdata[3,4] is row 3
and column 4 so it is at (x,y) location (4,3). The x and y coordinates
in mxin and myin should be in this index space of coordinates.
The qualifiers \EMPTY and \WEIGHTS cannot be used with \MATRIX.
See the PICK\MATRIX command for information on interactively choosing the
above mentioned boxes.