diff options
Diffstat (limited to '1523/CH2/EX2.33/2_33.sce')
-rwxr-xr-x | 1523/CH2/EX2.33/2_33.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/1523/CH2/EX2.33/2_33.sce b/1523/CH2/EX2.33/2_33.sce new file mode 100755 index 000000000..2b37a77b8 --- /dev/null +++ b/1523/CH2/EX2.33/2_33.sce @@ -0,0 +1,22 @@ +//Network Theorem 1
+//page no-2.36
+//example2.33
+disp("Applying KCL to node a:");
+disp("6*Va-5*Vb = -20");....//equation 1
+disp("Applying KCL to node b:");
+disp("-10*Va+17*Vb-5*Vc = 0");...//equation 2
+disp("At node c");
+disp("Vc = 20");
+disp("Solving equations 1,2 and 3");...//solving equations in matrix form
+A=[6 -5 0;-10 17 -5;0 0 1];
+B=[-20 0 20]'
+X=inv(A)*B;
+disp(X);
+disp("Va= 3.08 V");
+disp("Vb= 7.69 V");
+x=3.08;
+y=7.69;
+z=20;
+Va = x-y;
+Vb = y-z;
+mprintf("\nV1 = Va-Vb =%.2f V \nV2 = Vb-Vc =%.2f V",Va,Vb);
|