summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.54/Ex1_54.sce
blob: 78a174178a367aed1372100afbd4bdd4b58d1575 (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
28
29
30
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS 
//Example 54

clc;
disp("CHAPTER 1");
disp("EXAMPLE 54");

//VARIABLE INITIALIZATION
v=5;                            //voltage source in Volts
r1=1;                           //LHS resistance in Ohms
r2=5;                           //in Ohms
r3=1;                           //in Ohms
r4=1;                           //RHS resistance in Ohms
I=10;                           //current source in Amperes

//SOLUTION

req1=r1+r3+r4;                  //on deactivating the current source, current I1 flows in the circuit
I1=v/req1;
vab1=v-(I1*r1);                 //(I1*r1) is voltage drop across 1Ω resistance
I2=I/req1;
vab2=vab1+(I2*r1);              //(I2*r1) is voltage drop across 1Ω resistance
req=r1+((r3*r4)/(r3+r4));       //'req' is the same as 'Rth' mentioned in the book
I=vab2/(req+r2);
RTh=(6/5)+(3/4);                
req2=10+2;
I3=9/12;
disp(sprintf("The value of the current is %f A",I3));

//END