summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.25/Ex1_25.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1445/CH1/EX1.25/Ex1_25.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1445/CH1/EX1.25/Ex1_25.sce')
-rw-r--r--1445/CH1/EX1.25/Ex1_25.sce22
1 files changed, 22 insertions, 0 deletions
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
+