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 /848/CH3/EX3.1/Example3_1.sce | |
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 '848/CH3/EX3.1/Example3_1.sce')
-rwxr-xr-x | 848/CH3/EX3.1/Example3_1.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/848/CH3/EX3.1/Example3_1.sce b/848/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..1325273a5 --- /dev/null +++ b/848/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,18 @@ +//clear//
+//Caption:Program to Find Attenuation in dB/km
+//Example3.1
+//page 91
+clear;
+clc;
+z = [1 2]; //diatances are in kilometer
+alpha_in_dB_per_km = 3;
+r = (alpha_in_dB_per_km*z)/10;
+P0_Pz = (10^r);
+for i = 1:length(P0_Pz)
+ Pz_P0(i) = 1-(1/P0_Pz(i)) ;
+end
+disp(Pz_P0*100,'Optical signal power decreased by in percentage')
+//RESULT
+//Optical signal power decreased by in percentage
+// 49.881277
+// 74.881136
|