summaryrefslogtreecommitdiff
path: root/887/CH13/EX13.6/13_6.sce
blob: a7699d7d93e6f54525655c9cd0f277cf976ff1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
clc
//ex13.6
V_CC=15;
V_BB=5;
V_BE=0.7;      //assuming the device is in the active state
R_C=2*10^3;
R_E=2*10^3;
i_E=(V_BB-V_BE)/R_E;      //emitter current
printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")

//a)B=100
disp('For beta B=100:')
B=100;      //beta value
i_B=i_E/(B+1);      //base current
i_C=B*i_B;      //collector current
V_CE=V_CC-i_C*R_C-i_E*R_E;      //collector to emitter voltage
disp(i_C,'collector current in amperes')
disp(V_CE,'collector to emitter voltage in volts')

//b)B=300
disp('For beta B=300:')
B=300;      //beta value
i_B=i_E/(B+1);      //base current
i_C=B*i_B;      //collector current
V_CE=V_CC-i_C*R_C-i_E*R_E;      //collector to emitter voltage
disp(i_C,'collector current in amperes')
disp(V_CE,'collector to emitter voltage in volts')