Merge equilibrium samples
Code to apply media_temporal_equilibrio.awk
. in all files, merging every equilibrium density from every sample in the same file alogside the parameter values.
My simulation files have the parameter values in it so I can extract them and put as columns in this code. For example, square_r1.700000_g0.000000_d0.200000_seed1673476071.txt
.
Run with ./calcular_media.awk > file
.
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
27
28
# coloca num mesmo arquivo varias densidades no equilibrio de diferentes arquivos atraves do media_temporal_lucas
# hashtag apaga antes e porcentagem depois
# example:
# parameter_aux = ${name#*_parameter}
# gama=${parameter_aux%_parameter2*}
#!/bin/bash
export LC_NUMERIC="en_US.UTF-8" # no terminal caso esteja plotando virgula
for name in square*.txt
do
delta1=${name#*_g*_d}
delta=${delta1%_seed*}
R1=${name#*_r}
R=${R1%_g*}
gama1=${name#*_g}
gama=${gama1%_d*}
echo -n "$R $gama $delta "
awk -f media_temporal_equilibrio.awk $name
done
This post is licensed under CC BY 4.0 by the author.