# script to show sinc function set terminal postscript eps enhanced color font "Times-Italic,24pt" size 15cm,4cm dashlength 2.0 set output 'sinc.eps' set multiplot set border 0 #set tics nomirror set xrange [-5:5] set yrange [-.3:1.1] unset xtics unset ytics # first plot: time domain set origin 0,0 set size 0.5,1 b=3.0; h=1.0; a(x)=abs(x)>(b/2.0)?0:h set arrow 1 from 0,-.05 to 0,1.2 filled set arrow 2 from -5.5,0 to 5.5,0 filled set label 1 "a(t)" at .5,1.2 set label 2 "t" at 5,-.2 set xtics axis ("-b/2" -1.5, 0, "b/2" 1.5) offset 0,-.2 plot a(x) notitle lt 1 lw 3 lc rgb 'red' # second plot: frequency domain set origin 0.5,0 set size 0.5,1 h=.5; b=5 af(om)=h*b/sqrt(2*pi)*sin(om*b/2)/(om*b/2) set label 1 "~a{.4 \\~} ({/Symbol w})" at .5,1.2 set label 2 "{/Symbol w}" at 5,-.2 set xtics axis ("-2{/Symbol p}/b" -2*pi/b, 0, "2{/Symbol p}/b" 2*pi/b) plot af(x) notitle lt 1 lw 3 lc rgb 'red'