summaryrefslogtreecommitdiff
path: root/1535/CH12/EX12.5/Ch12Ex5.sci
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1535/CH12/EX12.5/Ch12Ex5.sci
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 '1535/CH12/EX12.5/Ch12Ex5.sci')
-rwxr-xr-x1535/CH12/EX12.5/Ch12Ex5.sci10
1 files changed, 10 insertions, 0 deletions
diff --git a/1535/CH12/EX12.5/Ch12Ex5.sci b/1535/CH12/EX12.5/Ch12Ex5.sci
new file mode 100755
index 000000000..adac22875
--- /dev/null
+++ b/1535/CH12/EX12.5/Ch12Ex5.sci
@@ -0,0 +1,10 @@
+// Scilab Code Ex12.5: Output power in fibre optic communication : Page-272 (2010)
+alpha = 2; // Power loss through optical fibre, dB/km
+P_in = 500; // Poer input of optical fibre, micro-watt
+z = 10; // Length of the optical fibre, km
+// As alpha = 10/z*log10(P_in/P_out), solving for P_out
+P_out = P_in/10^(alpha*z/10); // Output power in fibre optic communication, W
+printf("\nThe output power in fibre optic communication = %1d micro-watt", P_out);
+
+// Result
+// The output power in fibre optic communication = 5 micro-watt \ No newline at end of file