summaryrefslogtreecommitdiff
path: root/1871/CH12/EX12.7/Ch12Ex7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1871/CH12/EX12.7/Ch12Ex7.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1871/CH12/EX12.7/Ch12Ex7.sce')
-rwxr-xr-x1871/CH12/EX12.7/Ch12Ex7.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/1871/CH12/EX12.7/Ch12Ex7.sce b/1871/CH12/EX12.7/Ch12Ex7.sce
new file mode 100755
index 000000000..82e17513b
--- /dev/null
+++ b/1871/CH12/EX12.7/Ch12Ex7.sce
@@ -0,0 +1,10 @@
+// Scilab code Ex12.7: Pg:473 (2008)
+clc;clear;
+Pi = 1; // Initial Power level of optical fibre, mW
+Po = 0.85; // Output Power level of optical fibre, mW
+L = 0.5; // Lenght of optical fibre, km
+alpha = (10/L)*log10(Pi/Po); // Attenuation of optical signal, dB/km
+printf("\nThe attenuation of optical signal = %4.2f dB/km", alpha);
+
+// Result
+// The attenuation of optical signal = 1.41 dB/km \ No newline at end of file