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 --- 1523/CH2/EX2.20/2_20.sce | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 1523/CH2/EX2.20/2_20.sce (limited to '1523/CH2/EX2.20/2_20.sce') diff --git a/1523/CH2/EX2.20/2_20.sce b/1523/CH2/EX2.20/2_20.sce new file mode 100755 index 000000000..a56942a9c --- /dev/null +++ b/1523/CH2/EX2.20/2_20.sce @@ -0,0 +1,21 @@ +//Network Theorem 1 +//page no-2.26 +//example2.20 +disp("writing equation for supermesh,"); +disp("I1-I3=7");....//equation 1 +disp("Applying Kvl to the outer path of the supermesh:"); +disp("-I1+4*I2-4*I3 = -7");....//equation 2 +disp("Applying Kvl to mesh 2:"); +disp("I1-6*I2+3*I3 = 0");...//equation 3 +disp("Solving equations 1 ,2 and 3");...//solving equations in matrix form +A=[1 0 -1;-1 4 -4;1 -6 3]; +B=[7 -7 0]' +X=inv(A)*B; +disp(X); +disp("I1=9 A"); +disp("I2=-2.5 A"); +disp("I3=-2 A"); +x=2.5; +y=2; +z=x-y; +mprintf("\nCurrent through the 3-Ohm resistor = I2-I3 =%.1f A",z); -- cgit