10.20.11     STACK: Stack a Set of Matrices (with sequential filenames)

STACK  mat

Outputs a “stacked” matrix mat.ufm, built from the input matrices mat1.ufm, mat2.ufm, etc. etc. The number of sub-matrices n to be stacked depends on the maximum existing matrix file matn.ufm which may be found and, unlike MXSTACK (10.20.9), is not otherwise restricted as to the number of matrices to be stacked.

STACK differs from MXSTACK only in so far as the matrices to be stacked are not explicitly named on the command line but are implied by their “root” name (i.e., “mat”). The converse of STACK is the UNSTACK procedure which creates a set of sub-matrices from a stacked matrix based on a “root” filename.

STACK and UNSTACK may be conveniently used if you wish to perform the same operation (e.g., editing the zone structure) on each level of a stacked matrix.

From version 11.5.04F, STACK may also be used to stack “partial” or “rectangular” matrices (see 10.2.9) which each only contain a subset of origin rows but a full set of columns/blocks. The output matrix should therefore be complete in terms of rows and/or blocks but consist of a single level only.

Stacking Partial Matrices

The presumption is that the input partial matrices are in the correct order and “complete”. Thus if the full matrix is meant to represent 100 zones then the first partial matrix should contain, say, origin rows 1 to 40, the second 41 to 80 and the third 81 to 100. However there is no particular test that the matrices have been input in the correct order or that the final stacked output matrix is indeed “square” – rows equal columns.