diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /401/CH3/EX3.1 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '401/CH3/EX3.1')
-rwxr-xr-x | 401/CH3/EX3.1/Example3_1.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/401/CH3/EX3.1/Example3_1.sce b/401/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..5d95b7781 --- /dev/null +++ b/401/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,33 @@ +//Example 3.1
+//Program to Determine
+//(a)Overall signal attenuation
+//(b)Signal attenuation per kilometer
+//(c)Overall signal attenuation for 10 km optical link with splices
+//(d)Numerical Input/Output power ratio
+
+clear;
+clc ;
+close ;
+
+//Given data
+Pi=120; //uW - INPUT OPTICAL POWER
+Po=3; //uW - OUTPUT OPTICAL POWER
+L=8; //km - FIBER LENGTH
+
+//(a)Overall signal attenuation
+Alpha_dB_L=10*log10(Pi/Po);
+
+//(b)Signal attenuation per kilometer
+Alpha_dB=Alpha_dB_L/L;
+
+//(c)Overall signal attenuation for 10 km optical link with splices
+A=Alpha_dB*10+9;
+
+//(d)Numerical Input/Output power ratio
+Pi_by_Po=10^(round(A)/10);
+
+//Displaying the Results in Command Window
+printf("\n\n\t (a)Overall signal attenuation is %1.0f dB.",Alpha_dB_L);
+printf("\n\n\t (b)Signal attenuation per kilometer is %1.0f dB/km.",Alpha_dB);
+printf("\n\n\t (c)Overall signal attenuation for 10 km optical link with splices is %1.0f dB.",A);
+printf("\n\n\t (d)Numerical Input/Output power ratio is %0.1f.",Pi_by_Po);
\ No newline at end of file |