blob: 54afee149ea8332d55e43aa822500d49c41de4e9 (
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
|
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 18
disp("CHAPTER 1");
disp("EXAMPLE 18");
//VARIABLE INITIALIZATION
v=7; //voltage source in Volts
I=7; //current source in Amperes
r1=1; //in Ohms
r2=2; //in Ohms
r3=1; //in Ohms
r4=2; //in Ohms
r5=3; //in Ohms
//SOLUTION
I2=0; //since mesh 2 is open
I1=v-I2;
I3=I1/6; //from the equation
vth=-(r2*I3)+v;
r=r1+r5;
rth=(r*r4)/(r+r4);
I=vth/(rth+r3);
vx=-I*r3;
disp(sprintf("By Thevenin Theorem, the value of V_x is %d V",vx));
//END
|