The format option should be used to obtain pretty output. It refers to the format of all columns after the first one.
The z-columns (typically frequencies) can be any real numbers. The coordinate columns can be arbitrary positive integers, although matrix does put limits on their size.
This is best explained by way of an example. Suppose the file data contains the lines:
count x y ----- - - 1 1 2 1 1 3 2 3 4 2 4 5 2 4 6where exactly one tab-character separates the columns.
The command matrix "\t%.0f" < data yields
y x1 x2 x3 x4 - -- -- -- -- 2 1 0 0 0 3 1 0 0 0 4 0 0 2 0 5 0 0 0 2 6 0 0 0 2on the standard output.
The input does not need to be sorted in any way.
Matrix has hardwired dimensions. This should definitely be changed.
Other options may be available, e.g. to control whether lines consisting of all zeros are output. Check the code.