diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1544/CH2/EX2.9 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1544/CH2/EX2.9')
-rwxr-xr-x | 1544/CH2/EX2.9/Ch02Ex9.sce | 25 |
1 files changed, 25 insertions, 0 deletions
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
|