summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.15
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1445/CH1/EX1.15
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '1445/CH1/EX1.15')
-rw-r--r--1445/CH1/EX1.15/ch1_ex_15.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/1445/CH1/EX1.15/ch1_ex_15.sce b/1445/CH1/EX1.15/ch1_ex_15.sce
new file mode 100644
index 000000000..38a123382
--- /dev/null
+++ b/1445/CH1/EX1.15/ch1_ex_15.sce
@@ -0,0 +1,26 @@
+//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
+//Example 15
+
+disp("CHAPTER 1");
+disp("EXAMPLE 15");
+
+//VARIABLE INITIALIZATION
+v=7; //voltage source in Volts
+I=7; //current source in Amperes
+r3=1; //in Ohms
+
+//SOLUTION
+//(1)I1+(-4)I2+(4)I3=7............eq (1)
+//(-1)I1+(6)I2+(-3)I3=0...........eq (2)
+//(1)I1+(0)I2+(-1)I3=7............eq (3)
+//solving the equations by matrix method
+A=[1 -4 4;-1 6 -3;1 0 -1];
+b=[7;0;7];
+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
+vx=-(I3*r3);
+disp(sprintf("By Mesh analysis, the value of V_x is %d V",vx));
+
+//END