summaryrefslogtreecommitdiff
path: root/2534/CH11/EX11.6/Ex11_6.sce
blob: 5536ddbd13ee1004e7af0257c5ecea76164f0851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//Ex11_6
clc
VCC = 20//collector voltage
RL = 10//load resistance
disp("VCC = "+string(VCC)+"V")
disp("RL = "+string(RL)+"ohm")
Pi_dc = (VCC^2)/(RL)//input power
disp("Pi(dc) = (VCC^2)/(RL) = "+string(Pi_dc)+"W")
Po_ac = (VCC^2)/(2*RL)//output power
disp("Po_ac = (VCC^2)/(2*RL) = "+string(Po_ac)+"W")
eta = Po_ac/Pi_dc//efficiency
disp("eta = Po_ac/Pi_dc = "+string(eta*100)+"%")


// note : has modifed variables:
//        using Po_ac instead of Po(ac)
//        and   Pi_dc instead of Pi(dc).