Hello,
I have a ascii table that looks like this:
84.575 1.775
84.593 1.773
84.618 1.768
84.642 1.768
84.666 1.763
84.685 1.761
84.696 1.759
Th first column ranges from 0 to 120 and the second column from 0 to 4. I want to "bin" the first column (within 2 units) and calculate the average of the data from the second column that fall within the "bin".
For example, I want the bins (from first column) to be like [0-2], [2-4], [4-6]..., [118-120] with bin centers 1, 3, 5, ..., 119. And average of the data from second column falling under the bins.
So, my table should be like this:
1 ?
3 ?
5 ?
....
....
119 ?
Thanks
I have a ascii table that looks like this:
84.575 1.775
84.593 1.773
84.618 1.768
84.642 1.768
84.666 1.763
84.685 1.761
84.696 1.759
Th first column ranges from 0 to 120 and the second column from 0 to 4. I want to "bin" the first column (within 2 units) and calculate the average of the data from the second column that fall within the "bin".
For example, I want the bins (from first column) to be like [0-2], [2-4], [4-6]..., [118-120] with bin centers 1, 3, 5, ..., 119. And average of the data from second column falling under the bins.
So, my table should be like this:
1 ?
3 ?
5 ?
....
....
119 ?
Thanks