https://doi.org/10.5201/ipol.2015.108
script_gaussian.sh
#!/bin/bash
rm *.o
rm ./flutter_optimizer
rm *.ps
make
#Gaussian
./flutter_optimizer 0 0.25 52 5 code.txt TF_code.txt rendement.txt mean_sdt.txt
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Gain factor'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'rendement.ps
plot "rendement.txt" using 1:2 title 'Gain factor G(v)' with lines linewidth 5,\
"rendement.txt" using 1:3 title 'Average gain factor' with lines linewidth 5,\
"rendement.txt" using 1:4 title 'Velocity Distribution' with dots linewidth 5,\
"rendement.txt" every 2 using 1:5 title '"Gain=1 line". Above this line: the flutter beats the snapshot in terms of RMSE.' with points linewidth 5 lt 0
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'k'
set ylabel 'Gain'
set sample 1000000
set terminal postscript eps color
set output 'code.ps'
set key on below box title 'Legend'
set key left Left reverse
plot "code.txt" with steps title 'Flutter shutter code' linewidth 5
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'xi'
set ylabel 'Fourier tranforms (modulus)'
set sample 1000000
set terminal postscript eps color
set output 'TF_code.ps'
set key on below box title 'Legend'
set key left Left reverse
plot "TF_code.txt" using 1:3 with lines title "Fourier tranform (modulus) of the optimized flutter shutter function",\
"TF_code.txt" using 1:2 with lines title "Ideal Fourier tranform (modulus)" linewidth 5
EOF
mv code.txt code_n5.txt
mv TF_code.txt TF_code_n5.txt
mv rendement.txt rendement_n5.txt
mv code.ps code_n5.ps
mv rendement.ps rendement_n5.ps
mv TF_code.ps TF_code_n5.ps
mv mean_sdt.txt mean_sdt_n5.txt
./flutter_optimizer 0 0.25 52 10 code.txt TF_code.txt rendement.txt mean_sdt.txt
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'Velocity v'
set ylabel 'Gain factor'
set terminal postscript eps color
set key on below box title 'Legend'
set key left Left reverse
set output 'rendement.ps
plot "rendement.txt" using 1:2 title 'Gain factor G(v)' with lines linewidth 5,\
"rendement.txt" using 1:3 title 'Average gain factor' with lines linewidth 5,\
"rendement.txt" using 1:4 title 'Velocity Distribution' with dots linewidth 5,\
"rendement.txt" every 2 using 1:5 title '"Gain=1 line". Above this line: the flutter beats the snapshot in terms of RMSE.' with points linewidth 5 lt 0
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set lmargin 5
set rmargin 1
set xlabel 'k'
set ylabel 'Gain'
set sample 1000000
set terminal postscript eps color
set output 'code.ps'
set key on below box title 'Legend'
set key left Left reverse
plot "code.txt" with steps title 'Flutter shutter code' linewidth 5
EOF
gnuplot <<EOF
set lmargin 5
set rmargin 1
set xlabel 'xi'
set ylabel 'Fourier tranforms (modulus)'
set sample 1000000
set terminal postscript eps color
set output 'TF_code.ps'
set key on below box title 'Legend'
set key left Left reverse
plot "TF_code.txt" using 1:3 with lines title "Fourier tranform (modulus) of the optimized flutter shutter function",\
"TF_code.txt" using 1:2 with lines title "Ideal Fourier tranform (modulus)" linewidth 5
EOF
mv code.txt code_n10.txt
mv TF_code.txt TF_code_n10.txt
mv rendement.txt rendement_n10.txt
mv code.ps code_n10.ps
mv rendement.ps rendement_n10.ps
mv TF_code.ps TF_code_n10.ps
mv mean_sdt.txt mean_sdt_n10.txt
ps2eps -f -B -l *.ps