-
Notifications
You must be signed in to change notification settings - Fork 3
/
curvasBERSNR.plt
186 lines (181 loc) · 5.36 KB
/
curvasBERSNR.plt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/usr/bin/gnuplot -persist
#
#
# G N U P L O T
# Version 4.2 patchlevel 4
# last modified Sep 2008
# System: Linux 2.6.28-13-generic
#
# Copyright (C) 1986 - 1993, 1998, 2004, 2007, 2008
# Thomas Williams, Colin Kelley and many others
#
# Type `help` to access the on-line reference manual.
# The gnuplot FAQ is available from http://www.gnuplot.info/faq/
#
# Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>
#
# set terminal wxt 0
# set output
unset clip points
set clip one
unset clip two
set bar 1.000000
set border 31 front linetype -1 linewidth 1.000
set xdata
set ydata
set zdata
set x2data
set y2data
set timefmt x "%d/%m/%y,%H:%M"
set timefmt y "%d/%m/%y,%H:%M"
set timefmt z "%d/%m/%y,%H:%M"
set timefmt x2 "%d/%m/%y,%H:%M"
set timefmt y2 "%d/%m/%y,%H:%M"
set timefmt cb "%d/%m/%y,%H:%M"
set boxwidth
set style fill empty border
set style rectangle back fc lt -3 fillstyle solid 1.00 border -1
set dummy x,y
set format x "% g"
set format y "% g"
set format x2 "% g"
set format y2 "% g"
set format z "% g"
set format cb "% g"
set angles radians
unset grid
set key title "# bits"
set key inside left bottom vertical Right noreverse enhanced autotitles nobox
set key noinvert samplen 4 spacing 1 width 0 height 0
unset label
unset arrow
set style increment default
unset style line
unset style arrow
set style histogram clustered gap 2 title offset character 0, 0, 0
unset logscale
set logscale y 10
set offsets 0, 0, 0, 0
set pointsize 1
set encoding default
unset polar
unset parametric
unset decimalsign
set view 60, 30, 1, 1
set samples 100, 100
set isosamples 10, 10
set surface
unset contour
set clabel '%8.3g'
set mapping cartesian
set datafile separator whitespace
unset hidden3d
set cntrparam order 4
set cntrparam linear
set cntrparam levels auto 5
set cntrparam points 5
set size ratio 0 1,1
set origin 0,0
set style data linespoints
set style function lines
set xzeroaxis linetype -2 linewidth 1.000
set yzeroaxis linetype -2 linewidth 1.000
set zzeroaxis linetype -2 linewidth 1.000
set x2zeroaxis linetype -2 linewidth 1.000
set y2zeroaxis linetype -2 linewidth 1.000
set ticslevel 0.5
set mxtics default
set mytics default
set mztics default
set mx2tics default
set my2tics default
set mcbtics default
set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set xtics autofreq
set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set ytics autofreq
set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0
set ztics autofreq
set nox2tics
set noy2tics
set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set cbtics autofreq
set title ""
set title offset character 0, 0, 0 font "" norotate
set timestamp bottom
set timestamp ""
set timestamp offset character 0, 0, 0 font "" norotate
set rrange [ * : * ] noreverse nowriteback # (currently [0.00000:10.0000] )
set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set urange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set vrange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set xlabel "OSNR [dB]"
set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
set x2label ""
set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate
set xrange [ -25 : 12 ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set x2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set ylabel "BER"
set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set y2label ""
set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set yrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set y2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set zlabel ""
set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set cblabel ""
set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set cbrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set zero 1e-08
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set locale "C"
set pm3d explicit at s
set pm3d scansautomatic
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
set palette rgbformulae 7, 5, 15
set colorbox default
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
set loadpath
set fontpath
set fit noerrorvariables
GNUTERM = "wxt"
osnr1(x)= 10**(x/ 10)
# basico
g(x)= 0.5* erfc(osnr1(x) )
# neun
B= 10E9
Bo= 25E9
Be= 6E9
M= 0.5* (2* (Bo/ B)+ 1)
# f(x)= 0.5* erfc( (sqrt(2)* 2* osnr1(x)) )/ (sqrt(4* sqrt( osnr1(x))+ 1)+ 1) )
f(x)= 0.5* erfc( \
sqrt(Bo/ (2* Be))* ( \
(2* osnr1(x) )/ \
(sqrt(4* osnr1(x) +M )+ sqrt(M ) )\
)\
)
#, g(x) t 'Theor Agr'\
plot \
f(x) t 'Theor_pin'\
, 'BERSNRAT_1_9.dat' t '512'\
, 'BERSNRAT_1_15.dat' t '32K' \
, 'BERSNRAT_1_19.dat' t '512K' \
, 'BERSNRAT_1_20.dat' t '1M' \
#, 'BERSNRAT_1_25.dat' t '32M'
#, 'BERSNRAT_1_30.dat' t '1G'
set terminal postscript enhanced monochrome
set output 'BERvsSNR.eps'
replot
set terminal postscript enhanced colour
set output 'BERvsSNRc.eps'
replot
set terminal png
set output 'BERvsSNR.png'
replot
set terminal wxt
# EOF