From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2409/CH10/EX10.3/Ex10_3.sce | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 2409/CH10/EX10.3/Ex10_3.sce (limited to '2409/CH10/EX10.3') diff --git a/2409/CH10/EX10.3/Ex10_3.sce b/2409/CH10/EX10.3/Ex10_3.sce new file mode 100755 index 000000000..57418a073 --- /dev/null +++ b/2409/CH10/EX10.3/Ex10_3.sce @@ -0,0 +1,38 @@ +funcprot(0) +//Variable Declaration +BER=10**-5 //Maximum allowable bit error rate + +//Calculation + +x=linspace(8,10,11) //Eb/N0 ratio represented by x +x1=x**0.5 +for i = 1:11 + x(i)=10*log10(x(i)) //Converting x into decibels +end + +erf=linspace(0,0,11) //Initialization for erf function +Pe=linspace(0,0,11) //Initialization for Probablity of error + + +for i = 1:10 + k=integrate("exp(-t**2)",'t',0,x1(i)) + erf(i)=k(1)*(2/%pi**0.5) + Pe(i)=(1-erf(i))/2 //Probability of error +end +y=linspace(9,9.59,5) +z=linspace(BER,BER,5) +a=linspace(9.59,9.59,5) +b=linspace(0,BER,5) +plot(x,Pe) +plot(y,z) +plot(a,b) +xlabel('','xdB','Pe(x)') + +x=9.6 //The Eb/N0 ratio for Maximum BER(dB) from the graph +EbN0=x+2 //Eb/N0 ratio with implementation margin +//Results + +printf("The Eb/N0 ratio with allowable BER of 10^-5 and implementation margin of 2dB is %.1f dB",EbN0) + + + -- cgit