summaryrefslogtreecommitdiff
path: root/135/CH2/EX2.1/EX1.sce
blob: 4432eba66f4eec42da9174119e39e82cc9749f00 (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
// Example 2.1: (a) I,Vo
//              (b) I,Vo
clc, clear

disp("Part (a)");
// Applying Thevnin's theorem at XX', in Fig. 2.5(a)
Vth=15*20e3/(10e3+20e3); // Thevnin equivalent voltage in volts
Zth=10e3*20e3/(10e3+20e3); // Thevnin equivalent resistance in ohms
// From the figure 2.5(c)
I=Vth/(Zth+20e3); // Labelled current in amperes
Vo=I*20e3; // Labelled voltage in volts
I=I*1e3; // Labelled current in miliamperes
disp(I,"Labelled current I (mA) = ");
disp(Vo,"Labelled voltage Vo (V) = ");

disp("Part (b)");
// Applying Thevnin's theorem at XX' and YY', in Fig. 2.5(b)
Vth1=15*10e3/(10e3+10e3); // Thevnin equivalent voltage at XX' in volts
Zth1=10e3*10e3/(10e3+10e3); // Thevnin equivalent resistance at YY' in ohms
Vth2=5; // Thevnin equivalent voltage at YY' in volts
Zth2=5e3; // Thevnin equivalent resistance at YY' in ohms
// From the figure 2.5(d)
I=0; // Labelled current in amperes
Vo=5-7.5; // Labelled voltage in volts
disp(I,"Labelled current I = ");
disp(Vo,"Labelled voltage Vo (V) = ");