diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1523/CH2/EX2.30/2_30.sce | |
download | Scilab-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/CH2/EX2.30/2_30.sce')
-rwxr-xr-x | 1523/CH2/EX2.30/2_30.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/1523/CH2/EX2.30/2_30.sce b/1523/CH2/EX2.30/2_30.sce new file mode 100755 index 000000000..ddb514a28 --- /dev/null +++ b/1523/CH2/EX2.30/2_30.sce @@ -0,0 +1,21 @@ +//Network Theorem 1
+//page no-2.34
+//example2.30
+disp("Applying KCL to node 1:");
+disp("8*V1-V2 = 50");....//equation 1
+disp("Applying KCL to node 2:");
+disp("-2*V1+11*V2 = -500");...//equation 2
+disp("Solving equations 1 and 2");...//solving equations in matrix form
+A=[8 -1;-2 17];
+B=[50 -500]'
+X=inv(A)*B;
+disp(X);
+disp("V1= 2.61 V");
+disp("V2=-29.1 V");
+x=2.61;
+y=-29.1;
+I1=-x/2;
+I2=(x-y)/10;//current through 10 Ohm resistor
+I3=(y+50)/2;//50 volts is the supply to the circuit
+mprintf("\nI1= %.2f A \nI2= %.2f A \nI3= %.2f A",I1,I2,I3);
+
|