Hi,
I need to reduce a dataset(1000 rows) to approximately 40 or 50 rows by averaging each 20 rows. Any help from the awk forum is appreciated. I have something like this:
0 4
2 6
3 8
4 10
. .
. .
. .
. .
998 15
999 12
1000 13
In the beginning of the data set I would like to average every 2 or 3 rows and the end every 40 or 50 rows. Is there an awk script or command which provide flexibility with this kind of averaging. I have other data set which I also have to reduce. However in those situation I need different averaging (like 10 rows in the beginning and 2 rows at the end).
Thanks,
I need to reduce a dataset(1000 rows) to approximately 40 or 50 rows by averaging each 20 rows. Any help from the awk forum is appreciated. I have something like this:
0 4
2 6
3 8
4 10
. .
. .
. .
. .
998 15
999 12
1000 13
In the beginning of the data set I would like to average every 2 or 3 rows and the end every 40 or 50 rows. Is there an awk script or command which provide flexibility with this kind of averaging. I have other data set which I also have to reduce. However in those situation I need different averaging (like 10 rows in the beginning and 2 rows at the end).
Thanks,