diff options
Diffstat (limited to 'analysis')
-rwxr-xr-x | analysis/avgtrajlen.awk | 9 | ||||
-rwxr-xr-x | analysis/cumtrajhist.sh | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/analysis/avgtrajlen.awk b/analysis/avgtrajlen.awk new file mode 100755 index 0000000..a44ca55 --- /dev/null +++ b/analysis/avgtrajlen.awk @@ -0,0 +1,9 @@ +#!/usr/bin/awk -f + +{ + count = count + 1 + traj = traj + $2*$4/(1+$5) +} +END { + print traj/count +} diff --git a/analysis/cumtrajhist.sh b/analysis/cumtrajhist.sh new file mode 100755 index 0000000..ae6e5b2 --- /dev/null +++ b/analysis/cumtrajhist.sh @@ -0,0 +1,10 @@ +#!/bin/sh + + awk '{ print $4/(1+$5), $2*$4 }' \ +| sort -g \ +| awk ' + BEGIN { cum = 0 } + { print cum, $1 + cum = cum + $2 + last = $1 } + END { print cum, last }' |