I’ve a set of matrices stored in text files. I would like to compute an output matrix resulting of the element-wise averages of the input matrices. An illustration is given below:
cat file1.txt
Item0 Item1
Item0 1.01456e+06 5
Item1 2 12.2
cat file2.txt
Item0 Item1
Item0 1.0274e+06 6
Item1 0 14.5
cat output.txt
Item0 Item1
Item0 1020980 5.5
Item1 1 13.35
Note that some of the values in the input matrices are in engineering notation.
All suggestions are welcomed!
1 Answer