script_experiments.sh
#!/bin/bash
rm *.o
rm *.ps
rm *.eps
rm ./flutter_density_estimator
make
./flutter_density_estimator snapshot.txt density_snapshot.txt 0
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Probability'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'density_snapshot.ps
plot "density_snapshot.txt" using 1:2 with lines title 'Velocity probability density of the snapshot' linewidth 4 linecolor rgb "blue"
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'x'
set ylabel 'Estimated derivative of the function w'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'wprime_snapshot.ps
plot "wprime.txt" using 1:2 with lines title 'The estimated derivative of the function w for the snapshot' linewidth 4 linecolor rgb "blue"
EOF
./flutter_density_estimator agrawal1.txt density_agrawal1.txt 1
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Log of the Probability'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'density_agrawal1.ps
plot "density_agrawal1.txt" using 1:2 with lines title 'Velocity probability density of the first Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'x'
set ylabel 'Estimated derivative of the function w'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'wprime_agrawal1.ps
plot "wprime.txt" using 1:2 with lines title 'The estimated derivative of the function w for the first Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
./flutter_density_estimator agrawal2.txt density_agrawal2.txt 1
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Log of the Probability'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'density_agrawal2.ps
plot "density_agrawal2.txt" using 1:2 with lines title 'Velocity probability density of the second Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'x'
set ylabel 'Estimated derivative of the function w'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'wprime_agrawal2.ps
plot "wprime.txt" using 1:2 with lines title 'The estimated derivative of the function w for the second Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
./flutter_density_estimator agrawal3.txt density_agrawal3.txt 1
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Log of the Probability'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'density_agrawal3.ps
plot "density_agrawal3.txt" using 1:2 with lines title 'Velocity probability density of the third Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'x'
set ylabel 'Estimated derivative of the function w'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'wprime_agrawal3.ps
plot "wprime.txt" using 1:2 with lines title 'The estimated derivative of the function w for the third Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
./flutter_density_estimator agrawal4.txt density_agrawal4.txt 1
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Log of the Probability'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'density_agrawal4.ps
plot "density_agrawal4.txt" using 1:2 with lines title 'Velocity probability density of the fourth Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'x'
set ylabel 'Estimated derivative of the function w'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'wprime_agrawal4.ps
plot "wprime.txt" using 1:2 with lines title 'The estimated derivative of the function w for the fourth Agrawal et al. code' linewidth 4 linecolor rgb "blue"
EOF
./flutter_density_estimator mccloskey.txt density_mccloskey.txt 1
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel ' Log of the Probability'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'density_mccloskey.ps
plot "density_mccloskey.txt" using 1:2 with lines title 'Velocity probability density of the McCloskey et al. et al. code' linewidth 4 linecolor rgb "blue"
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'x'
set ylabel 'Estimated derivative of the function w'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'wprime_mccloskey.ps
plot "wprime.txt" using 1:2 with lines title 'The estimated derivative of the function w of the McCloskey et al. et al. code' linewidth 4 linecolor rgb "blue"
EOF
ps2eps -f -B -l *.ps