The title pretty much states the problem.
Given a table (matrix) of m (cols) by n (rows), is there an easy way, using gmtmath, to compute the mean (i.e., average) across each row?
The table is in binary form, or I would use awk to transpose rows to columns, then feed into gmtmath, which works by column.
Gmtconvert could be used to put the table in text format, then transpose, but that adds to the runtime required. Actually not that bad, in terms of runtime, but gmtmath didn’t like the width of the text table, which had (after transpose) 483 columns. Got lots of warnings:
gmtmath [WARNING]: Long input record (4898 bytes) was truncated to first 4094 bytes!
How can I get past this? Any ideas?