summaryrefslogtreecommitdiff
path: root/1529/CH10/EX10.12/10_12.sce
blob: b2abc7a4d13caaead63842510c1c9c83cd887c76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Chapter 10, Problem 12, figure 10.30
clc;
rP1 = 3;            // ratio of two powers
rP2 = 20;           // ratio of two powers
rP3 = 400;          // ratio of two powers
rP4 = 1/20;         // ratio of two powers
//calculation:
X1 = 10*log10(3)
X2 = 10*log10(20)
X3 = 10*log10(400)
X4 = 10*log10(1/20)

printf("\n\n (a)decibel power ratio for power ratio 3 = %.2f dB ",X1)
printf("\n\n (b)decibel power ratio for power ratio 20 = %.1f dB ",X2)
printf("\n\n (c)decibel power ratio for power ratio 400 = %.1f dB ",X3)
printf("\n\n (d)decibel power ratio for power ratio 1/20 = %.1f dB ",X4)