summaryrefslogtreecommitdiff
path: root/2409/CH10/EX10.1/Ex10_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '2409/CH10/EX10.1/Ex10_1.sce')
-rwxr-xr-x2409/CH10/EX10.1/Ex10_1.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/2409/CH10/EX10.1/Ex10_1.sce b/2409/CH10/EX10.1/Ex10_1.sce
new file mode 100755
index 000000000..ca7a80f60
--- /dev/null
+++ b/2409/CH10/EX10.1/Ex10_1.sce
@@ -0,0 +1,19 @@
+
+funcprot(0)
+
+//Variable Declaration
+PR=0.01 //The Average power received(watts)
+Tb=0.0001 //Bit period(seconds)
+N0=10**-7 //Noise power(joule)
+
+//Calculations
+Eb=PR*Tb //Energy per bit received (joule)
+x=sqrt(Eb/N0)
+
+
+erf=integrate("exp(-t^2)","t",0,x)
+erf1=erf*(2/%pi**0.5)
+BER=(1-erf1)*(10**6)/2
+
+printf("The Bit error rate is %.1f * 10^-6", BER)
+