diff options
Diffstat (limited to '1445/CH1/EX1.18')
-rw-r--r-- | 1445/CH1/EX1.18/ch1_ex_18.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/1445/CH1/EX1.18/ch1_ex_18.sce b/1445/CH1/EX1.18/ch1_ex_18.sce new file mode 100644 index 000000000..54afee149 --- /dev/null +++ b/1445/CH1/EX1.18/ch1_ex_18.sce @@ -0,0 +1,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 |