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 --- 401/CH14/EX14.1/Example14_1.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 401/CH14/EX14.1/Example14_1.sce (limited to '401/CH14/EX14.1') diff --git a/401/CH14/EX14.1/Example14_1.sce b/401/CH14/EX14.1/Example14_1.sce new file mode 100755 index 000000000..b0a1e376f --- /dev/null +++ b/401/CH14/EX14.1/Example14_1.sce @@ -0,0 +1,23 @@ +//Example 14.1 +//Program to determine the attenuation per kilometer for the fiber +//and estimate the accuracy of the result + +clear; +clc ; +close ; + +//Given data +L1=2*10^3; //metres - INITIAL LENGTH +L2=2; //metres - FINAL LENGTH +V1=2.1; //volts - INITIAL OUTPUT VOLTAGE +V2=10.7; //volts - FINAL OUTPUT VOLTAGE + +//Attenuation per Kilometer +alpha_dB=10/(L1-L2)*log10(V2/V1); + +//Uncertainity in measured attenuation +Uncertainity=0.2/(L1-L2); + +//Displaying the Results in Command Window +printf("\n\n\t Attenuation is %0.1f dB/km.",alpha_dB*10^3); +printf("\n\n\t Uncertainity in measured attenuation is +-%0.1f dB.",Uncertainity*10^3); \ No newline at end of file -- cgit