From bc2d5f410212f9036c76ea1fa75a0948d6475960 Mon Sep 17 00:00:00 2001 From: Refik Hadzialic Date: Sat, 16 Jun 2012 19:29:18 +0200 Subject: Function plot --- vorlagen/thesis/src/img/2D-SearchSpace.gnu | 73 ++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 vorlagen/thesis/src/img/2D-SearchSpace.gnu (limited to 'vorlagen/thesis/src/img/2D-SearchSpace.gnu') diff --git a/vorlagen/thesis/src/img/2D-SearchSpace.gnu b/vorlagen/thesis/src/img/2D-SearchSpace.gnu new file mode 100644 index 0000000..ef3ce16 --- /dev/null +++ b/vorlagen/thesis/src/img/2D-SearchSpace.gnu @@ -0,0 +1,73 @@ +# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 +# set output 'surface1.16.png' +#set dummy u,v +#set label 1 "Doppler frequency bins" at 6, 0, -1 left norotate back nopoint offset character 0, 0, 0 +#set label 2 "u=0" at 5, 6.5, -1 left norotate back nopoint offset character 0, 0, 0 +set label 3 "Peak = 1" at 1.8, 2.5, 0.900248 left norotate back nopoint offset character 0, 0, 0 +#set arrow 1 from 5, -5, -1.2 to 5, 5, -1.2 head back nofilled linetype -1 linewidth 1.000 +#set arrow 2 from 5, 6, -1 to 5, 5, -1 head back nofilled linetype -1 linewidth 1.000 +#set arrow 3 from 3.8, 2.9, 1.500248 to 1.8, 2.16, 1 head back nofilled linetype -1 linewidth 1.000 +set parametric +set view 52, 34, 1, 1 +#set samples 51, 51 +set isosamples 2, 40 +set hidden3d back offset 1 trianglepattern 3 undefined 1 altdiagonal bentover +set ztics -1.00000,0.25,1.00000 norangelimit +set title "Correlation peak over freq/code search space" +#set xlabel "Frequency (kHz)" +set xlabel offset character -3, -2, 0 font "" textcolor lt -1 norotate +set xrange [ 0.8 : 2.2 ] noreverse nowriteback +#set ylabel "Code-delay(chips) τ" +set ylabel offset character 3, -2, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ -4.00000 : 4.70000 ] noreverse nowriteback +set zlabel "Z axis" +set zlabel offset character -5, 0, 0 font "" textcolor lt -1 norotate +set zrange [ -0.26000 : 1.00000 ] noreverse nowriteback +set grid + +set style line 1 linecolor rgb "#1FBED6" +set style line 2 linecolor rgb "#FF717E" +set style line 3 linecolor rgb "#555555" +set style line 4 linecolor rgb "#97C30A" + +delta=0.174 +e=exp(1) +c=sqrt(delta) +mu = 2 +a =(1/(sqrt(delta)*sqrt(2*pi))) +b = mu +gausFun(x) = a*e**((-1)*((x-b)**2)/(2*(c**2)))+rand(0)/10 + + +x0 = 1 +x1 = 1.1 +x2 = 1.2 +x3 = 1.3 +x4 = 1.4 +x5 = 1.5 +x6 = 1.6 +x7 = 1.7 +x8 = 1.8 +x9 = 1.9 +x10 = 2 +x11 = 2.1 +#set term epslatex +#set output "graph1.eps" +# choose the SVG terminal +set terminal svg +set output '2D-SearchSpace.svg' + +splot [u=0:0.3][v=-4:4] \ + x0, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle, \ + x1, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle, \ + x2, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle, \ + x3, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle, \ + x4, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle, \ + x5, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle, \ + x6, v, (u<0.25) ? -0.25 : 0.3*gausFun(v)+rand(0)/10 ls 1 notitle, \ + x7, v, (u<0.25) ? -0.25 : 0.5*gausFun(v)+rand(0)/10 ls 4 notitle, \ + x8, v, (u<0.25) ? -0.25 : gausFun(v) ls 2 notitle, \ + x9, v, (u<0.25) ? -0.25 : 0.5*gausFun(v) ls 4 notitle, \ + x10, v, (u<0.25) ? -0.25 : 0.3*gausFun(v) ls 1 notitle, \ + x11, v, (u<0.25) ? -0.25 : rand(0)/10 ls 3 notitle +pause 1 -- cgit v1.2.3-55-g7522