I have an array file and I need to do a math operation with the elements. The operation that I need to do is to multiply the element by itself, the to print it.
The input looks like this:
1: 6.1703
44 -0.27135
46 0.30270
44 0.52648
2: 6.1932
44 0.51448
46 0.14674
44 0.27957
46 -0.31834
3: 6.5664
45 -0.11892
45 0.66483
46 0.12505
the first row of each array is the header. The math operation need to be done with the elements of the second column.
The output need to be:
1: 6.1703
44 0.07363
46 0.09162
44 0.27718
2: 6.1932
44 0.26468
46 0.02153
44 0.07815
46 0.10134
3: 6.5664
45 0.0141
45 0.44199
46 0.01563
Any ideas or suggestion?