summaryrefslogtreecommitdiff
path: root/3809/CH3/EX3.4/EX3_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '3809/CH3/EX3.4/EX3_4.sce')
-rw-r--r--3809/CH3/EX3.4/EX3_4.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/3809/CH3/EX3.4/EX3_4.sce b/3809/CH3/EX3.4/EX3_4.sce
new file mode 100644
index 000000000..0e77235a4
--- /dev/null
+++ b/3809/CH3/EX3.4/EX3_4.sce
@@ -0,0 +1,14 @@
+//Chapter 3, Example 3.4
+clc
+
+R1=25 //resistance in ohm
+R2=400 //resistance in ohm
+
+//To solve simultaneous equation by converting them into matrices form
+a=[R1 -2;R2 -8]
+b=[50;3200]
+x=a\b
+
+//Results
+printf("Voc = %d V\n",x(1)) //display voltage Voc
+printf("R = %d Ohm",x(2)) //display Resistance R