diff options
Diffstat (limited to '147/CH2/EX2.8')
-rw-r--r-- | 147/CH2/EX2.8/Example2_8.sce | 19 | ||||
-rw-r--r-- | 147/CH2/EX2.8/Result2_8.txt | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/147/CH2/EX2.8/Example2_8.sce b/147/CH2/EX2.8/Example2_8.sce new file mode 100644 index 000000000..60121924d --- /dev/null +++ b/147/CH2/EX2.8/Example2_8.sce @@ -0,0 +1,19 @@ +//Resistance R, Voltage V
+close();
+clear;
+clc;
+R1 = 6;//ohm
+R2 = 1;
+R3 = 2;
+R4 = 3;
+R5 = 10;
+V1 = 10;//V
+V2 = 20;
+//Solving Nodal equations
+A = [1/R1+1/R2+1/R3 -1/R3;-1/R3 1/R3+1/R4+1/R5];
+C = [V1/R1;V2/R5];
+B = inv(A)*C;
+V3 = B(1,1);
+V4 = B(2,1);
+I = (V4-V2)/R5;
+mprintf('I = %0.2f A',I);
\ No newline at end of file diff --git a/147/CH2/EX2.8/Result2_8.txt b/147/CH2/EX2.8/Result2_8.txt new file mode 100644 index 000000000..e3ae3e929 --- /dev/null +++ b/147/CH2/EX2.8/Result2_8.txt @@ -0,0 +1 @@ +I = -1.68 A
\ No newline at end of file |