summaryrefslogtreecommitdiff
path: root/3809/CH3/EX3.8/EX3_8.sce
diff options
context:
space:
mode:
Diffstat (limited to '3809/CH3/EX3.8/EX3_8.sce')
-rw-r--r--3809/CH3/EX3.8/EX3_8.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/3809/CH3/EX3.8/EX3_8.sce b/3809/CH3/EX3.8/EX3_8.sce
new file mode 100644
index 000000000..a1bc927b4
--- /dev/null
+++ b/3809/CH3/EX3.8/EX3_8.sce
@@ -0,0 +1,14 @@
+//Chapter 3, Example 3.8
+clc
+Re=10 //resistance in ohm
+//To solve simulataneous equation by converting them itno matrices form
+a=[-160 20 30;20 -210 10;30 10 -190]
+b=[-50;0; 0]
+x=a\b
+Ve=Re*(x(3)-x(2)) //voltage
+
+//Results
+printf("I1 = %.2f mA\n",x(1)*1000)
+printf("I2 = %.2f mA\n",x(2)*1000)
+printf("I3 = %.2f mA\n",x(3)*1000)
+printf("Voltage, VE = %.2f V\n",Ve)