#! /bin/sh # # DJ without phase shift error export GDFONTPATH="/usr/share/fonts/open-sans" export GNUPLOT_DEFAULT_GDFONT="OpenSans-Semibold" m=7 n=$((m+1)) title="Deutsch-Jozsa problem, m=$m" xlabel="Number of 1's" ylabel="Probability f is constant" labels="set title \"$title\"\nset xlabel \"$xlabel\"\nset ylabel \"$ylabel\"" ./DJ -s $n > DJ.out tail -n +2 DJ.out | (printf "set term gif\nset output\n $labels\n plot '-' notitle with linespoints\n"; cat) | gnuplot > DJ.gif