summaryrefslogtreecommitdiff
path: root/1523/CH3/EX3.11/3_11.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1523/CH3/EX3.11/3_11.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 '1523/CH3/EX3.11/3_11.sce')
-rwxr-xr-x1523/CH3/EX3.11/3_11.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/1523/CH3/EX3.11/3_11.sce b/1523/CH3/EX3.11/3_11.sce
new file mode 100755
index 000000000..2c031f084
--- /dev/null
+++ b/1523/CH3/EX3.11/3_11.sce
@@ -0,0 +1,26 @@
+//Network Theorem 2
+//pg no 3.12
+//example 3.11
+//when 5 A source is acting alone
+disp("-V1+4I=0");//equation 1
+disp("Applying KCL to node 1,");
+disp("1.25V1-4I=5");//equation 2
+A=[-1 4;1.25 -4];//solving equation in matrix form
+B=[0 5]'
+X=inv(A)*B;
+disp(X);
+disp("V1 = 20 V");
+//when the 20 V source is acting alone
+disp("from the figure,");
+disp("V2-3I=0");//equation 1
+disp("Applying KVL to the mesh,");
+disp("I=-20");//equation 2
+A=[1 -3;0 1];//solving equation in matrix form
+B=[0 -20]'
+X=inv(A)*B;
+disp(X);
+disp("V2 = -60 V");
+a=20;
+b=-60;
+x=a+b;
+mprintf("\nBy superposition theorem, \n V = V1+V2 = %.f V ",x);