summaryrefslogtreecommitdiff
path: root/1871/CH12/EX12.7
diff options
context:
space:
mode:
Diffstat (limited to '1871/CH12/EX12.7')
-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