I have a column of data that looks like this:
6.14001 6.13606 6.13752 6.12979 6.13292 6.13987 6.13182 6.1356 6.13161 6.13784 6.1346 6.13486 6.13165 6.13396 6.13786 6.13502 How can I do the following: Enter entries in a consistent way (1 * 2) + (2 * 3) + (3 * 4) ...) and average .. And then start multiplying by 2 (2 * 3) + (3 * 4) + (4 * 5) and take this average from 3 and so on. Is it possible to do with awk? Once you save numbers in the array, you can do things you want: {I = 1; i ; n ++} {s [i] = a [i] for awk '{a [NR] = $ 0} END { * A [I + 1] for T + = s [i]} (i = nr -1; i> i;) {t- = s [nr-1a]; Printf "% d:% .5f \ n Output with your data:
Output with your data:
1: 37.63623 2: 37.63343 3: 37.63137 4: 37.63217 5: 37.63569 6: 37.63373 7: 37.63208 8: 37.63353 9: 37.63559 10: 37.63571 11: 37.63247 12: 37.63277 13: 37.63886 14: 37.65264 15: 37.65589
Comments
Post a Comment