summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.59/ch1_ex_59.sce
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.59/ch1_ex_59.sce
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.59/ch1_ex_59.sce')
-rw-r--r--1445/CH1/EX1.59/ch1_ex_59.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/1445/CH1/EX1.59/ch1_ex_59.sce b/1445/CH1/EX1.59/ch1_ex_59.sce
new file mode 100644
index 000000000..907d3074d
--- /dev/null
+++ b/1445/CH1/EX1.59/ch1_ex_59.sce
@@ -0,0 +1,23 @@
+//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
+//Example 59
+
+disp("CHAPTER 1");
+disp("EXAMPLE 59");
+
+//SOLUTION
+
+//I1+I2=20...............eq (1)
+//-I1+I2=10..............eq (2)
+//solving the simultaneous equations by matrix method
+
+A=[1 1;-1 1];
+b=[20;10];
+x=inv(A)*b;
+x1=x(1,:); //to access 1st element of 2X1 matrix
+x2=x(2,:); //to access 2nd element of 2X1 matrix
+disp(sprintf("Current I1= %d A",x1));
+disp(sprintf("Current I2= %d A",x2));
+
+//END
+
+