summaryrefslogtreecommitdiff
path: root/1319/CH12/EX12.22/i_22.sce
diff options
context:
space:
mode:
Diffstat (limited to '1319/CH12/EX12.22/i_22.sce')
-rw-r--r--1319/CH12/EX12.22/i_22.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/1319/CH12/EX12.22/i_22.sce b/1319/CH12/EX12.22/i_22.sce
new file mode 100644
index 000000000..134830d87
--- /dev/null
+++ b/1319/CH12/EX12.22/i_22.sce
@@ -0,0 +1,25 @@
+// Determine Current through branch AB of the given network
+
+clc;
+clear;
+
+// MESH Equations
+// 4*i1-2*i2+0*i3=10
+// -2*i1+6*i2-2*i3=0
+//0*i1-2*i2+6*i3=0
+
+//Supply Voltage is 10V (Note printing mistake)
+
+R=[4 -2 0;-2 6 -2; 0 -2 6];
+V=[10;0;0];
+
+// Loop Currents
+
+I=inv(R)*V;
+
+i1=I(1);
+i2=I(2);
+i3=I(3);
+
+disp('amperes',abs(i2),'The current through branch AB of the network =')
+