From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 848/CH3/EX3.1/Example3_1.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 848/CH3/EX3.1/Example3_1.sce (limited to '848/CH3/EX3.1') 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 -- cgit