Time average in equilibrium
Code used in merge_samples.sh
to average over time the densities from each sample.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Comments:
# plota densidade media no equilibrio pra uma evoluçao temporal
# se plotar com virgular escrever no terminal: export LC_NUMERIC="en_US.UTF-8"
BEGIN {
#printf export LC_NUMERIC="en_US.UTF-8"
i=0;
}
{
if ($1 >=70000)
{
for(j=1;j<=NF;j++)
{
media[j] += $j;
#print media[j]
}
++i;
}
}
END {
for(j=2;j<=NF;j++)
{
printf "%s ",media[j]/i
}
printf "\n"
}
This post is licensed under CC BY 4.0 by the author.