From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1445/CH1/EX1.7/Ex1_7.sce | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 1445/CH1/EX1.7/Ex1_7.sce (limited to '1445/CH1/EX1.7/Ex1_7.sce') diff --git a/1445/CH1/EX1.7/Ex1_7.sce b/1445/CH1/EX1.7/Ex1_7.sce new file mode 100644 index 000000000..0d1f19f9b --- /dev/null +++ b/1445/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,43 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 7 + +disp("CHAPTER 1"); +disp("EXAMPLE 7"); + +//VARIABLE INITIALIZATION +I1=1; //current source in Amperes +v1=4; //voltage source in Volts +v2=3; //voltage source in Volts +v3=6; //voltage source in Volts +r1=2; //resistance in Ohms +r2=2; //resistance in Ohms +r3=1; //resistance in Ohms +r4=3; //resistance in Ohms + +//SOLUTION +//converting all the voltage sources into current sources +I2=v1/r1; +I3=v2/r3; +I4=v3/r4; +disp(sprintf("The four current sources are %d A, %d A, %d A and %d A",I1,I2,I3,I4)); + +req1=(r1*r2)/(r1+r2); //parallel combination of resistors +req2=(r3*r4)/(r3+r4); +v2=(I1+I4)*req1; +v3=(I3-I2)*req2; +req=req1+req2; +v=v2+v3; +I=v/req; +disp("VOLTAGE EQUIVALENT CIRCUIT:"); +disp(sprintf(" Voltage source= %.2f V",v)); +disp(sprintf(" Equivalent resistance(in series)= %.2f Ω",req)); +disp("CURRENT EQUIVALENT CIRCUIT:"); +disp(sprintf(" Current source= %.2f A",I)); +disp(sprintf(" Equivalent resistance(in parallel)= %.2f Ω",req)); + +//END + + + + + -- cgit