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 --- 1445/CH1/EX1.25/Ex1_25.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 1445/CH1/EX1.25/Ex1_25.sce (limited to '1445/CH1/EX1.25/Ex1_25.sce') diff --git a/1445/CH1/EX1.25/Ex1_25.sce b/1445/CH1/EX1.25/Ex1_25.sce new file mode 100644 index 000000000..e1c250c68 --- /dev/null +++ b/1445/CH1/EX1.25/Ex1_25.sce @@ -0,0 +1,22 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 25 + +disp("CHAPTER 1"); +disp("EXAMPLE 25"); + +//SOLUTION +//(1)I1+(0)I2+(0)I3=5.............eq (1) +//(-20)I1+(50)I2+(-20)I3=0........eq (2) +//(0)I1+(1)I2+(-1)I3=5............eq (3) +//solving the equations by matrix mehod +A=[1 0 0;-20 50 -20;0 1 -1]; +b=[5;0;5]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 3X1 matrix +I2=x(2,:); //to access the 2nd element of 3X1 matrix +I3=x(3,:); //to access the 3rd element of 3X1 matrix +I=I2; +disp(sprintf("By Mesh analysis, the value of I is %d A",I)); + +//END + -- cgit