summaryrefslogtreecommitdiff
path: root/2384/CH1/EX1.8/ex1_8.sce
diff options
context:
space:
mode:
Diffstat (limited to '2384/CH1/EX1.8/ex1_8.sce')
-rwxr-xr-x2384/CH1/EX1.8/ex1_8.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/2384/CH1/EX1.8/ex1_8.sce b/2384/CH1/EX1.8/ex1_8.sce
new file mode 100755
index 000000000..c7e7556d7
--- /dev/null
+++ b/2384/CH1/EX1.8/ex1_8.sce
@@ -0,0 +1,24 @@
+// Exa 1.8
+clc;
+clear;
+close;
+format('v',7)
+// Given data
+R1= 2;// in ohm
+R2= 4;// in ohm
+R3= 1;// in ohm
+R4= 6;// in ohm
+R5= 4;// in ohm
+V1= 10;// in V
+V2= 20;// in V
+//Applying KVL in ABGHA : I1*(R1+R2) - R2*I2 = V1 (i)
+//Applying KVL in BCFGB : I1*R5-I2*(R3+R4+R5)+I3*R4 = 0 (ii)
+//Applying KVL in CDEFC: R4*I2-I3*(R2+R4)=V2 (iii)
+A= [(R1+R2) R5 0; -R2 -(R3+R4+R5) R4; 0 R4 -(R2+R4)];
+B= [V1 0 V2];
+I= B*A^-1;// Solving eq(i), (ii) and (iii) by Matrix method
+I1= I(1);// in A
+I2= I(2);// in A
+I3= I(3);// in A
+I6_ohm_resistor= I2-I3;//The current through 6 ohm resistance in A
+disp(I6_ohm_resistor,"The current through 6 ohm resistance in A is : ")