diff options
Diffstat (limited to '1544/CH2')
-rwxr-xr-x | 1544/CH2/EX2.1/Ch02Ex1.sce | 26 | ||||
-rwxr-xr-x | 1544/CH2/EX2.10/Ch02Ex10.sce | 27 | ||||
-rwxr-xr-x | 1544/CH2/EX2.11/Ch02Ex11.sce | 31 | ||||
-rwxr-xr-x | 1544/CH2/EX2.12/Ch02Ex12.sce | 12 | ||||
-rwxr-xr-x | 1544/CH2/EX2.13/Ch02Ex13.sce | 20 | ||||
-rwxr-xr-x | 1544/CH2/EX2.14/Ch02Ex14.sce | 21 | ||||
-rwxr-xr-x | 1544/CH2/EX2.15/Ch02Ex15.sce | 14 | ||||
-rwxr-xr-x | 1544/CH2/EX2.2/Ch02Ex2.sce | 14 | ||||
-rwxr-xr-x | 1544/CH2/EX2.3/Ch02Ex3.sce | 24 | ||||
-rwxr-xr-x | 1544/CH2/EX2.4/Ch02Ex4.sce | 21 | ||||
-rwxr-xr-x | 1544/CH2/EX2.5/Ch02Ex5.sce | 17 | ||||
-rwxr-xr-x | 1544/CH2/EX2.6/Ch02Ex6.sce | 27 | ||||
-rwxr-xr-x | 1544/CH2/EX2.7/Ch02Ex7.sce | 56 | ||||
-rwxr-xr-x | 1544/CH2/EX2.8/Ch02Ex8.sce | 20 | ||||
-rwxr-xr-x | 1544/CH2/EX2.9/Ch02Ex9.sce | 25 |
15 files changed, 355 insertions, 0 deletions
diff --git a/1544/CH2/EX2.1/Ch02Ex1.sce b/1544/CH2/EX2.1/Ch02Ex1.sce new file mode 100755 index 000000000..b0682acaf --- /dev/null +++ b/1544/CH2/EX2.1/Ch02Ex1.sce @@ -0,0 +1,26 @@ +// scilab code Ex2.1: Pg 32 (2008)
+clc; clear;
+E = 24; // E.m.f of battery,V
+R1 = 330; // Resistance, ohms
+R2 = 1500; // Resistance, ohms
+R3 = 470; // Resistance, ohms
+// As resistances R1, R2 & R3 are joined end-to-end hence, they are in series & in series connection, circuit resistance is the sum of individual resistances present in the circuit
+R = R1 + R2 + R3; // Resistance of circuit, ohms
+I = E/R; // Circuit current, A
+// As the resistances are in series so same current flows through each resistor & potential drop across each resistor is equal to the product of circuit current & its respective resistance( from Ohm's law, V = I*R )
+V1 = I*R1; // Potential difference developed across resistance R1, V
+V2 = I*R2; // Potential difference developed across resistance R2, V
+V3 = I*R3; // Potential difference developed across resistance R3, V
+P = E*I; // Electric power dissipated by the complete circuit, W
+printf("\nThe circuit resistance = %4d ohms or %3.1f kilo-ohms", R, R*1e-03);
+printf("\nThe circuit current = %5.2f milli-ampere",I/1e-03);
+printf("\nThe potential drop across resisatnce R1 = %4.2f volts\nThe potential drop across resistance R2 = %5.2f volts\nThe potential drop across resistance R3 = %4.2f volts", V1, V2, V3);
+printf("\nThe power dissipated by the complete circuit = %4.2f watt or %3d milli-watt", P,P/1e-03 );
+
+// Result
+// The circuit resistance = 2300 ohms or 2.3 kilo-ohms
+// The circuit current = 10.43 milli-ampere
+// The potential drop across resisatnce R1 = 3.44 volts
+// The potential drop across resistance R2 = 15.65 volts
+// The potential drop across resistance R3 = 4.90 volts
+// The power dissipated by the complete circuit = 0.25 watt or 250 milli-watt
diff --git a/1544/CH2/EX2.10/Ch02Ex10.sce b/1544/CH2/EX2.10/Ch02Ex10.sce new file mode 100755 index 000000000..16041bf50 --- /dev/null +++ b/1544/CH2/EX2.10/Ch02Ex10.sce @@ -0,0 +1,27 @@ +// Scilab code Ex2.10: Pg 53 (2008)
+clc; clear;
+E1 = 6; // E.m.f of battery, V
+E2 = 4.5; // E.m.f of battery, V
+R1 = 1.5; // Resistance, ohm
+R2 = 2; // Resistance, ohm
+R3 = 5; // Resistance, ohm
+// Part (a)
+// Using matrix method for solving set of equations
+A = [6.5 5; 5 7];
+B = [6; 4.5];
+X = inv(A)*B;
+I1 = X(1,:); // Electric current through branch FA, A
+I2 = X(2,:); // Electric current through branch DC, A
+I3 = ( I1 + I2); // Electric current through branch BE, A
+// Part (b)
+V_BE = I3*R3; // P.d across resistor R3, V
+printf("\nElectric current through branch FA = %5.3f A", I1);
+printf("\nElectric current through branch DC = %6.4f A", I2);
+printf("\nElectric current through branch BE = %5.3f A", I3);
+printf("\np.d across resistor %1d ohms = %5.3f V", R3, V_BE);
+
+// Result
+// Electric current through branch FA = 0.951 A
+// Electric current through branch DC = -0.0366 A
+// Electric current through branch FA = 0.915 A
+// p.d across resistor %1d ohms = 4.573 V
diff --git a/1544/CH2/EX2.11/Ch02Ex11.sce b/1544/CH2/EX2.11/Ch02Ex11.sce new file mode 100755 index 000000000..bf281a459 --- /dev/null +++ b/1544/CH2/EX2.11/Ch02Ex11.sce @@ -0,0 +1,31 @@ +// Scilab code Ex2.11: Pg 57 (2008)
+clc; clear;
+R_AB = 6; // Resistance, ohm
+R_BC = 4; // Resistance, ohm
+R_DC = 1; // Resistance, ohm
+R_AD = 3; // Resistance, ohm
+R_BD = 5; // Resistance, ohm
+// Using matrix method for solving the set of equations
+A = [6 -3 5; -4 1 10; 0 4 1];
+B = [0; 0; 10];
+X = inv(A)*B;
+I1 = X(1,:); // Electric current, A
+I2 = X(2,:); // Electric current, A
+I3 = X(3,:); // Electric current, A
+I_BC = I1 - I3; // Electric current, A
+I_DC = I2 + I3; // Electric current, A
+I = I1 + I2; // Suplly current, A
+printf("\nThe current through %1d ohm resistor = %5.3f A", R_AB, I1);
+printf("\nThe current through %1d ohm resistor = %4.2f A", R_BC, I_BC);
+printf("\nThe current through %1d ohm resistor = %5.3f A", R_DC, I_DC);
+printf("\nThe current through %1d ohm resistor = %5.3f A", R_AD, I2);
+printf("\nThe current through %1d ohm resistor = %5.3f A", R_BD, I3);
+printf("\nThe supply current = %5.3f A", I)
+
+// Result
+// The current through 6 ohm resistor = 1.074 A
+// The current through 4 ohm resistor = 0.89 A
+// The current through 1 ohm resistor = 2.638 A
+// The current through 3 ohm resistor = 2.454 A
+// The current through 5 ohms resistor = 0.184 A
+// The supply current = 3.529 A
diff --git a/1544/CH2/EX2.12/Ch02Ex12.sce b/1544/CH2/EX2.12/Ch02Ex12.sce new file mode 100755 index 000000000..2a0775303 --- /dev/null +++ b/1544/CH2/EX2.12/Ch02Ex12.sce @@ -0,0 +1,12 @@ +// Scilab code Ex2.12: Pg 58-59 (2008)
+clc; clear;
+R_AB = 6; // Resistance across branch AB, ohm
+R_AD = 3; // Resistance across branch AD, ohm
+R_BC = 4; // Resistance across branch BC, ohm
+R_DC = 2; // Resistance across branch DC, ohm
+// Since R_AB/R_AD = R_BC/R_DC, so the wheatstone bridge is balanced hence no current flows through branch BD
+I3 = 0;
+printf("\nThe current through branch BD i.e I3 = %1d A", I3);
+
+// Result
+// The current through branch BD i.e I3 = 0 A
diff --git a/1544/CH2/EX2.13/Ch02Ex13.sce b/1544/CH2/EX2.13/Ch02Ex13.sce new file mode 100755 index 000000000..934b0a438 --- /dev/null +++ b/1544/CH2/EX2.13/Ch02Ex13.sce @@ -0,0 +1,20 @@ +// Scilab code Ex2.13: Pg 62-63 (2008)
+clc; clear;
+R1 = 20; // Resistance, ohm
+R2 = 10; // Resistance, ohm
+R3 = 8; // Resistance, ohm
+R4 = 5; // Resistance, ohm
+R5 = 2; // Resistance, ohm
+A = [20 -10 8; -5 2 15; 0 12 2];
+B = [0; 0; 10];
+X = inv(A)*B;
+I3 = X(3,:); // Electric current through BD, A
+V_BD = I3*R3; // P.d across branch BD, V
+// For balance conditions i.e I3 = 0, R1/R2 = R4/R5, solving for R4
+R_4 = ( R1*R5 )/R2; // Resistance, ohm
+printf("\nThe p.d between terminals B and D = %5.3f V", V_BD);
+printf("\nThe value to which %1d ohm resistor must be adjusted in order to reduce the current through %1d ohm resistor to zero = %1d ohm", R4, R3, R_4);
+
+// Result
+// The p.d between terminals B and D = 0.195 V
+// The value to which 5 ohm resistor must be adjusted in order to reduce the current through 8 ohm resistor to zero = 4 ohm
diff --git a/1544/CH2/EX2.14/Ch02Ex14.sce b/1544/CH2/EX2.14/Ch02Ex14.sce new file mode 100755 index 000000000..a39846180 --- /dev/null +++ b/1544/CH2/EX2.14/Ch02Ex14.sce @@ -0,0 +1,21 @@ +// Scilab code Ex2.14: Pg 64 (2008)
+clc; clear;
+// For part (a)
+Rm = 1000; // Resistance, ohm
+Rd = 1; // Resistance, ohm
+Rv = 3502; // Resistance, ohm
+// Using Wheatstone bridge balanced condition i.e Rx/Rv = Rm/Rd , solving for Rx
+Rx = ( Rm/Rd) * Rv; // Resistance,ohm
+printf("\nThe value of the resistance being measured = %5.3f mega-ohm",Rx*1e-06);
+
+// Part (b)
+Rm = 1; // Resistance, ohm
+Rd = 1000; // Resistance, ohm
+Rv = 296; // Resistance, ohm
+// Using Wheatstone bridge balanced condition i.e Rx/Rv = Rm/Rd , solving for Rx
+Rx = ( Rm/Rd )*Rv; // Resistance,ohm
+printf("\nThe value of the resistance being measured = %5.3f ohm",Rx);
+
+// Result
+// The value of the resistance being measured = 3.502 mega-ohm
+// The value of the resistance being measured = 0.296 ohm
diff --git a/1544/CH2/EX2.15/Ch02Ex15.sce b/1544/CH2/EX2.15/Ch02Ex15.sce new file mode 100755 index 000000000..ffef3b98a --- /dev/null +++ b/1544/CH2/EX2.15/Ch02Ex15.sce @@ -0,0 +1,14 @@ +// Scilab code Ex2.15: Pg 67 (2008)
+clc; clear;
+l1 = 600e-03; // Scale reading, metre
+l2 = 745e-03; // Scale reading, metre
+l_s = 509.3e-03; // Total scale length, metre
+E_s = 1.0186; // Source voltage, V
+E1 = ( l1/l_s )*E_s; // Voltage drop across length l1, V
+E2 = ( l2/l_s)*E_s; // Voltage drop across length l2, V
+printf("\nThe emf of the first cell = %3.1f V ", E1)
+printf("\nThe emf of the second cell = %3.2f V ", E2)
+
+// Result
+// The emf of the first cell = 1.2 V
+// The emf of the first cell = 1.49 V
diff --git a/1544/CH2/EX2.2/Ch02Ex2.sce b/1544/CH2/EX2.2/Ch02Ex2.sce new file mode 100755 index 000000000..f3a2a4c59 --- /dev/null +++ b/1544/CH2/EX2.2/Ch02Ex2.sce @@ -0,0 +1,14 @@ +// Scilab code Ex2.2: Pg 34 (2008)
+clc; clear;
+E = 12; // E.m.f of battery, V
+R_BC = 16; // Resistance across branch BC, ohms
+P_BC = 4; // Electric power dissipated by resistance R_BC, W
+// using relation P = I^2/R, solving for I
+I = sqrt( P_BC/R_BC); // Electric current,A
+R = E/I; // Total circuit resistance, ohms
+R_AB = R - R_BC; // Resistance across branch AB, ohms
+printf("\nThe circuit current = %3.1f A\nThe value of other resistor = %1d ohms", I, R_AB);
+
+// Result
+// The circuit current = 0.5 A
+//The value of other resistor = 8 ohms
diff --git a/1544/CH2/EX2.3/Ch02Ex3.sce b/1544/CH2/EX2.3/Ch02Ex3.sce new file mode 100755 index 000000000..8e00024fb --- /dev/null +++ b/1544/CH2/EX2.3/Ch02Ex3.sce @@ -0,0 +1,24 @@ +// Scilab code Ex2.3: Pg 37 (2008)
+clc; clear;
+E = 24; // E.m.f of battery, V
+R_1 = 330; // Resistance, ohms
+R_2 = 1500; //Resistance, ohms
+R_3 = 470; //Resistance, ohms
+// Since one end of each resistor is connected to positive terminal of battery and the other end to the negative terminal, therefore, the resistors are in parallel & in parallel connection the equivalent resistance of the circuit is equal to the reciprocal of the sum of conductances of individual resistances present in the circuit i.e 1/R = 1/R_1 + 1/R_2 + 1/R_3, solving for R
+R = (R_1*R_2*R_3)/( R_1*R_2 + R_2*R_3 + R_3*R_1); // Equivalent resisance of circuit, ohms
+// Since the resistances are in parallel so potetial difference across each resistor is same & in our case is equal to e.m.f of battery & from Ohm's law, V = I*R, solving for I
+I_1 = E/R_1; // Current through resistor R_1, A
+I_2 = E/R_2; // Current through resistor R_2, A
+I_3 = E/R_3; // Current through resistance R_3, A
+// Current drawn from battery is equal to the sum of branch currents
+I = I_1 + I_2 + I_3; // Current drawn from battery, A
+printf("\nThe total resistance of the circuit = %6.2f ohms",R);
+printf("\nThe branch current I1 = %5.2f mA\nThe branch current I2 = %2d mA\nThe branch current I3 = %5.2f mA", I_1/1e-03, I_2/1e-03, I_3/1e-03);
+printf("\nThe current drawn from the battery = %5.1f mA", I/1e-03);
+
+// Result
+// The total resistance of the circuit = 171.68 ohms
+// The branch current I1 = 72.73 mA
+// The branch current I2 = 16 mA
+// The branch current I3 = 51.06 mA
+// The current drawn from the battery = 139.8 mA
diff --git a/1544/CH2/EX2.4/Ch02Ex4.sce b/1544/CH2/EX2.4/Ch02Ex4.sce new file mode 100755 index 000000000..7e126c13c --- /dev/null +++ b/1544/CH2/EX2.4/Ch02Ex4.sce @@ -0,0 +1,21 @@ +// scilab code Ex2.4: Pg 39 (2008)
+clc; clear;
+E = 12; // E.m.f of battery, V
+R1 = 6; // Resistance, ohms
+R2 = 3; // Resistance, ohms
+// Since the two resistances are in parallel, therefore effective resistance of the circuit is equal to the reciprocal of the sum of conductances ( 1/Ressistance) of individual resistances present in the circuit i.e 1/R = 1/R1 + 1/R2, simplifying for R
+R = ( R1*R2)/(R1 + R2); // Effective resistance of the circuit, ohms
+// Fron Ohm's law, V = I*R, solving for I
+I = E/R; // Circuit current, A
+I1 = E/R1; // Current through resistance R1, A
+I2 = E/R2; // Current thrugh resistance R2, A
+printf("\nEffective resistance of the circuit = %1d ohms", R);
+printf("\nThe current drawn from the battery = %1d A", I);
+printf("\nThe current through resistor R1 = %1d A", I1);
+printf("\nThe current through R2 resistor = %1d A", I2);
+
+// Result
+// Effective resistance of the circuit = 2 ohms
+// The current drawn from the battery = 6 A
+// The current through resistor R1 = 2 A
+// The current through R2 resistor = 4 A
diff --git a/1544/CH2/EX2.5/Ch02Ex5.sce b/1544/CH2/EX2.5/Ch02Ex5.sce new file mode 100755 index 000000000..239ecc75f --- /dev/null +++ b/1544/CH2/EX2.5/Ch02Ex5.sce @@ -0,0 +1,17 @@ +// Scilab code Ex2.5: Pg 39-40 (2008)
+clc; clear;
+R1 = 10; // Resistance, ohm
+R2 = 20; // Resistance, ohm
+R3 = 30; // Resistance, ohm
+// Part (a)
+// Since in sreies combination, the equivalent resistance of the circuit is the sum of the individual resistances present in the circuit i.e R = R1 + R2 + R3
+R_s = R1 + R2 + R3; // Equivalent series resistance of the circuit, ohms
+// Part (b)
+// Since in parallel combination, the equivalent resistance of the circuit is the reciprocal of the sum of the conductances of the individual resistances present in the circuit i.e 1/R = 1/R1 + 1/R2 + 1/R3, solving for R;
+R_p = ( R1*R2*R3 )/( R1*R2 + R2*R3 + R3*R1 ); // Equivalent parallel resistance of the circuit, ohms
+printf("\nEquivalent series resistance of the circuit = %2d ohm", R_s);
+printf("\nEquivalent parallel resistance of the circuit = %4.2f ohm", R_p);
+
+// Result
+// Equivalent series resistance of the circuit = 60 ohm
+// Equivalent parallel resistance of the circuit = 5.45 ohm
diff --git a/1544/CH2/EX2.6/Ch02Ex6.sce b/1544/CH2/EX2.6/Ch02Ex6.sce new file mode 100755 index 000000000..8b243423f --- /dev/null +++ b/1544/CH2/EX2.6/Ch02Ex6.sce @@ -0,0 +1,27 @@ +// Scilab code Ex2.6: Pg 43 (2008)
+clc; clear;
+E = 64; // E.m.f of battery, V
+R1 = 6; // Resistance, ohm
+R2 = 4; // Resistance, ohm
+// Part (a)
+// Since R1 & R2 are parallel to one another hence, their equivalent resistance is equal to the sum of reciprocal of their individual resistances
+R_BC = ( R1*R2)/( R1 + R2 ); // Equivalent resistance across branch BC, ohm
+R_AB = 5.6; // Resistance across branch AB, ohm
+// Since R_AB & R_BC are in series, therefore, their equivalent resistance is equal to the sum of their individual resistances
+R_AC = R_AB + R_BC; // Total circuit resistance, ohm
+// From Ohm's law, V = I*R, solving for I
+I = E/R_AC; // Total circuit current, A
+// Part (b)
+V_BC = I*R_BC; // Potential difference across branch BC, V
+I1 = V_BC/R1; // Electric current through resistor R1, A
+// Part (c)
+// Since P = I^2*R
+P_AB = I^2*R_AB; // Power dissipated by 5.6 ohm resistance, W
+printf("\nThe current drawn fron the supply = %1d A ", I);
+printf("\nThe current through %1d ohm resistor = %3.1f A", R1, I1);
+printf("\nThe power dissipated by %3.1f ohm resistor = %5.1f W", R_AB, P_AB);
+
+// Result
+// The current drawn fron the supply = 8 A
+// The current through 6 ohm resistor = 3.2 A
+// The power dissipated by 5.6 ohm resistor = 358.4 W
diff --git a/1544/CH2/EX2.7/Ch02Ex7.sce b/1544/CH2/EX2.7/Ch02Ex7.sce new file mode 100755 index 000000000..83390f284 --- /dev/null +++ b/1544/CH2/EX2.7/Ch02Ex7.sce @@ -0,0 +1,56 @@ +// Scilab code Ex2.7: Pg 46 (2008)
+clc; clear;
+E = 18; // E.m.f of battery, V
+R1 = 4; // Resistance, ohm
+R2 = 6; // Resistance, ohm
+R3 = 5; // Resistance, ohm
+R4 = 3; // Resistance, ohm
+R5 = 6; // Resistance, ohm
+R6 = 8; // Resistance, ohm
+// Part (a)
+// Since resistance R1 & R2 are in parallel, therefore, equivalent resistance across branch AB will be equal to the reciprocal of the sum of conductances ( 1/Ressistance) of individual resistances present in the circuit i.e 1/R_AB = 1/R1 + 1/R2, simplifying for R_AB
+R_AB = ( R1*R2 )/( R1 + R2); // Resistance, ohm
+R_BC = R3; // Resistance across branch BC, ohm
+// Since resistance R4, R5 & R6 are in parallel, therefore, equivalent resistance across branch CD will be equal to the reciprocal of the sum of conductances ( 1/Ressistance) of individual resistances present in the circuit i.e 1/R_CD = 1/R4 + 1/R5 + 1/R6, simplifying for R _CD
+R_CD = ( R4*R5*R6 )/( R4*R5 + R5*R6 + R6*R4 ); // Resistance, ohm
+// Since R_AB, R_BC & R_CD forms series combination, therefore circuit resistance will be their series sum
+R = R_AB + R_BC + R_CD; // Circuit resistance, ohm
+I = E/R; // Supply current, A
+// Part (b)
+// AS resistances R1 & R2 are parallel, therefore tere will be same potential difference across them, denoted by V_AB
+V_AB = I*R_AB; // Potential difference, V
+// AS resistances R4, R5 & R6 are parallel, therefore tere will be same potential difference across them, denoted by V_CD
+V_CD = I*R_CD; // Potential difference, V
+V_BC = I*R_BC; // Potential difference, V
+// Part (c)
+I1 = V_AB/R1; // Current through R1 resistor, A
+I2 = V_AB/R2; // Current through R2 resistor, A
+I4 = V_CD/R4; // Current through R4 resistor, A
+I5 = V_CD/R5; // Current through R5 resistor, A
+I6 = V_CD/R6; // Current through R6 resistor, A
+// Part (d)
+P3= I^2*R3; // Power dissipated, W
+printf("\nThe current drawn from the source = %1d A", I);
+printf("\nThe p.d. across resistor %1d ohm & %1d ohm = %3.1f V", R1, R2, V_AB);
+printf("\nThe p.d. across resistor %1d ohm, %1d ohm & %1d ohm = %3.1f V", R4, R5, R6, V_CD);
+printf("\nThe p.d. across resistor %1d ohm = %2d V", R3, V_BC);
+printf("\nThe current through resistor %1d ohm = %3.1f A", R1, I1);
+printf("\nThe current through resistor %1d ohm = %3.1f A", R2, I2);
+printf("\nThe current through resistor %1d ohm = %1d A", R3, I);
+printf("\nThe current through resistor %1d ohm = %5.3f A", R4, I4);
+printf("\nThe current through resistor %1d ohm = %5.3f A", R5,I5);
+printf("\nThe current through resistor %1d ohm = %3.1f A", R6, I6);
+printf("\nThe power dissipated by the %1d ohm resistor = %2d W", R3, P3);
+
+// Result
+// The current drawn from the source = 2 A
+// The p.d. across resistor 4 ohm & 6 ohm = 4.8 V
+// The p.d. across resistor 3 ohm, 6 ohm & 8 ohms = 3.2 V
+// The p.d. across resistor 5 ohm = 10 V
+// The current through resistor 4 ohm = 1.2 A
+// The current through resistor 6 ohm = 0.8 A
+// The current through resistor 5 ohm = 2 A
+// The current through resistor 3 ohm = 1.067 A
+// The current through resistor 6 ohm = 0.533 A
+// The current through resistor 8 ohm = 0.4 A
+// The power dissipated by the 5 ohm resistor = 20 W
diff --git a/1544/CH2/EX2.8/Ch02Ex8.sce b/1544/CH2/EX2.8/Ch02Ex8.sce new file mode 100755 index 000000000..d549fc58a --- /dev/null +++ b/1544/CH2/EX2.8/Ch02Ex8.sce @@ -0,0 +1,20 @@ +// Scilab code Ex2.8: 49 (2008)
+clc; clear;
+// Applying Kirchhoff’s current law (the sum of the currents arriving at a junction is equal to the sum of the currents leaving that junction) at junction A
+I2 = 40 + 10; // Electric current, A
+// Applying Kirchhoff’s current law at junction C
+I1 = 80 - I2; // Electric current, A
+// Applying Kirchhoff’s current law at junction D
+I3 = 80 + 30; // Electric current, A
+// Applying Kirchhoff’s current law at junction E
+I4 = I3 - 25; // Electris current, A
+// Applying Kirchhoff’s current law at junction F
+I5 = 30 - 85; // Electric cuurent, A
+printf("\nCurrent I1 = %2d A\nCurrent I2 = %2d A\nCurrent I3 = %3d A\nCurrent I4 = %2d A\nCurrent I5 = %2d A,", I1, I2, I3, I4, I5);
+
+// Result
+// Current I1 = 30 A
+// Current I2 = 50 A
+// Current I3 = 110 A
+// Current I4 = 85 A
+// Current I5 = -55 A
diff --git a/1544/CH2/EX2.9/Ch02Ex9.sce b/1544/CH2/EX2.9/Ch02Ex9.sce new file mode 100755 index 000000000..a42d98212 --- /dev/null +++ b/1544/CH2/EX2.9/Ch02Ex9.sce @@ -0,0 +1,25 @@ +// Scilab code Ex2.9: Pg 52-53 (2008)
+clc; clear;
+R1 = 3; // Resisance, ohms
+R2 = 2; // Resistance, ohms
+R3 = 10; // Resistance, ohms
+E1 = 10; // E.m.f, V
+E2 = 4; // E.m.f, V
+// Applying Kirchhoff ’ s Current Law(the sum of the currents arriving at a junction is equal to the sum of the currents leaving that junction)
+A = [3 -2; 13 10];
+B = [6; 10];
+X = inv(A)*B;
+I1 = X(1,:); // Electric current through branch FA, A
+I2 = X(2,:); // Eleactric current through branch EB, A
+I3 = ( I1 + I2 ); // Electric current through branch CD, A
+V_CD = R3*I3; // P.d.across R3 resistor, V
+printf("\nThe current through branch FA = %6.3f A", I1);
+printf("\nThe current through branch EB = %5.3f A", I2);
+printf("\nThe current through branch CD = %5.3f A", I3);
+printf("\np.d.across %2d resistor = %4.2f V", R3, V_CD);
+
+// Result
+// The current through branch FA = 1.429 A
+// The current through branch FA = -0.857 A
+// The current through branch FA = 0.571 A
+// p.d.across %2d resistor = 5.71 V
|