diff options
Diffstat (limited to '401/CH14/EX14.7/Example14_7.sce')
-rwxr-xr-x | 401/CH14/EX14.7/Example14_7.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/401/CH14/EX14.7/Example14_7.sce b/401/CH14/EX14.7/Example14_7.sce new file mode 100755 index 000000000..684d249e7 --- /dev/null +++ b/401/CH14/EX14.7/Example14_7.sce @@ -0,0 +1,26 @@ +//Example 14.7
+//Program to:
+//(a) Convert optical signal powers to dBm
+//(b) Convert optical signal powers to dBu
+
+clear;
+clc ;
+close ;
+
+//(a)Convert optical signal powers to dBm
+Po=5*10^(-3); //Watt - GIVEN OPTICAL POWER
+dBm=10*log10(Po/1*10^3);
+printf("\n\n\t (a)The %1.0f mW of optical power is equivalent to %0.2f dBm.",Po/10^(-3), dBm);
+
+Po=20*10^(-6); //Watt - GIVEN OPTICAL POWER
+dBm=10*log10(Po/1*10^3);
+printf("\n\n\t The %1.0f uW of optical power is equivalent to %0.2f dBm.",Po/10^(-6), dBm);
+
+//(b)Convert optical signal powers to dBu
+Po=0.03*10^(-3); //Watt - GIVEN OPTICAL POWER
+dBm=10*log10(Po/1*10^6);
+printf("\n\n\t (b)The %0.2f mW of optical power is equivalent to %0.2f dBu.",Po/10^(-3), dBm);
+
+Po=800*10^(-9); //Watt - GIVEN OPTICAL POWER
+dBm=10*log10(Po/1*10^6);
+printf("\n\n\t The %1.0f nW of optical power is equivalent to %0.2f dBu.",Po/10^(-9), dBm);
|