summaryrefslogtreecommitdiff
path: root/3506/CH8/EX8.1/exp_8_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3506/CH8/EX8.1/exp_8_1.sce')
-rw-r--r--3506/CH8/EX8.1/exp_8_1.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/3506/CH8/EX8.1/exp_8_1.sce b/3506/CH8/EX8.1/exp_8_1.sce
new file mode 100644
index 000000000..8ea943fb5
--- /dev/null
+++ b/3506/CH8/EX8.1/exp_8_1.sce
@@ -0,0 +1,17 @@
+//Optical Fiber communication by A selvarajan
+//example 8.1
+//OS=Windows XP sp3
+//Scilab version 5.5.1
+clc;
+clear all;
+eta=0.8;//quantum efficiency of detection
+Ps=2e-9;//received optical power in W
+h=6.62*1e-34;//plancks constant
+lambda=1500*1e-9//wavelength in m
+c=3*1e8//velocity of light in m/s
+new=c/lambda;//frequency in Hz
+B=1e6;//Signal Bandwidth in Hz
+SNR=(eta*Ps)/(2*h*new*B);//signal to noise ratio
+SNRdB=10*log10(SNR)//signal to noise ratio in dB)
+mprintf("signal to noise ratio=%f",SNR)//the answer in textbook is wrong
+mprintf("\nsignal to noise ratio=%f dB",SNRdB)//the answer in textbook is wrong