summaryrefslogtreecommitdiff
path: root/1655/CH8/EX8.3.1
diff options
context:
space:
mode:
Diffstat (limited to '1655/CH8/EX8.3.1')
-rwxr-xr-x1655/CH8/EX8.3.1/Example_8_3_1.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/1655/CH8/EX8.3.1/Example_8_3_1.sce b/1655/CH8/EX8.3.1/Example_8_3_1.sce
new file mode 100755
index 000000000..c8a4d9ff7
--- /dev/null
+++ b/1655/CH8/EX8.3.1/Example_8_3_1.sce
@@ -0,0 +1,20 @@
+// Example 8.3.1 page 8.9
+
+clc;
+clear;
+
+P=10^-9; //probability of error
+eta=1; //ideal detector
+h=6.626d-34 //plank's constant
+c=3d8; //speed of light
+lamda=1d-6; //wavelength
+B=10^7; //bit rate
+
+Mn= - log(P);
+printf("\n The quantum imit at the receiver to maintain bit error rate 10^-9 is (%.1f*h*f)/eta.",Mn);
+f=c/lamda
+Popt= 0.5*Mn*h*f*B/eta; //computing optical power
+Popt_dB = 10 * log10(Popt) + 30; //optical power in dbm
+Popt=Popt*10^12;
+
+printf("\nMinimum incident optical power is %.1f W or %.1f dBm.",Popt,Popt_dB);