Question

I have several files from Acquire1_00001.txt ... Acquire1_00050.txt

The values in there are all tab separated like this:

3.500E2 -2.3386E0
3.510E2 39.192E-2
3.520E2 -46.143E-2
3.530E2 -42.809E-4
3.540E2 2.9356E0
3.550E2 1.0014E0
3.560E2 -1.3001E0
3.570E2 4.5244E0

Now I am trying to average all the files into a new file. So far the exponential notation of the values is driving me crazy. What can I do?

Was it helpful?

Solution

This is a pretty standard E-notation that lots of software understands.

It's easy enough to convert to a standard decimal notation with a script on unix, though you will lose some precision (1e-100 would print 0.00000, for instance):

 awk '{ printf "%.40f %.40f\n", $1, $2}' < e-notation-file.txt > d-notation-file.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top