summaryrefslogtreecommitdiff
path: root/3809/CH1
diff options
context:
space:
mode:
Diffstat (limited to '3809/CH1')
-rw-r--r--3809/CH1/EX1.1/EX1_1.sce14
-rw-r--r--3809/CH1/EX1.2/EX1_2.sce12
-rw-r--r--3809/CH1/EX1.3/EX1_3.sce12
-rw-r--r--3809/CH1/EX1.4/EX1_4.sce14
-rw-r--r--3809/CH1/EX1.5/EX1_5.sce18
-rw-r--r--3809/CH1/EX1.6/EX1_6.sce17
-rw-r--r--3809/CH1/EX1.7/EX1_7.sce16
-rw-r--r--3809/CH1/EX1.8/EX1_8.sce16
-rw-r--r--3809/CH1/EX1.9/EX1_9.sce13
9 files changed, 132 insertions, 0 deletions
diff --git a/3809/CH1/EX1.1/EX1_1.sce b/3809/CH1/EX1.1/EX1_1.sce
new file mode 100644
index 000000000..9931be8e4
--- /dev/null
+++ b/3809/CH1/EX1.1/EX1_1.sce
@@ -0,0 +1,14 @@
+//Chapter 1, Example 1.1
+
+clc
+//Initialisation
+v1=15.8 //voltage
+v2=12.3 //voltage
+r=220 //resistance in ohm
+
+//Calculation
+v=v1-v2 //voltage
+i=v/r //current in ampere
+
+//Results
+printf("Current, I = %.1f mA",(i*1000))
diff --git a/3809/CH1/EX1.2/EX1_2.sce b/3809/CH1/EX1.2/EX1_2.sce
new file mode 100644
index 000000000..1b849ed74
--- /dev/null
+++ b/3809/CH1/EX1.2/EX1_2.sce
@@ -0,0 +1,12 @@
+//Chapter 1, Example 1.2
+
+clc
+//Initialisation
+i1=10 //current in ampere
+i3=3 //current in ampere
+
+//Calculation
+i2=i1-i3 //current in ampere
+
+//Results
+printf("Current, I = %.1f A",i2)
diff --git a/3809/CH1/EX1.3/EX1_3.sce b/3809/CH1/EX1.3/EX1_3.sce
new file mode 100644
index 000000000..f9eb2e0fe
--- /dev/null
+++ b/3809/CH1/EX1.3/EX1_3.sce
@@ -0,0 +1,12 @@
+//Chapter 1, Example 1.3
+
+clc
+//Initialisation
+v2=7 //voltage
+e=12 //emf
+
+//Calculation
+v1=e-v2 //voltage
+
+//Results
+printf("Voltage, V = %.1f V",v1)
diff --git a/3809/CH1/EX1.4/EX1_4.sce b/3809/CH1/EX1.4/EX1_4.sce
new file mode 100644
index 000000000..ee3d0837d
--- /dev/null
+++ b/3809/CH1/EX1.4/EX1_4.sce
@@ -0,0 +1,14 @@
+//Chapter 1, Example 1.4
+
+clc
+//Initialisation
+r=50 //resistance in ohm
+i=3 //current in ampere
+
+
+
+//Calculation
+p=i^2*r //Power in watts
+
+//Results
+printf("Power P = %.1f Watt",p)
diff --git a/3809/CH1/EX1.5/EX1_5.sce b/3809/CH1/EX1.5/EX1_5.sce
new file mode 100644
index 000000000..2ba00a689
--- /dev/null
+++ b/3809/CH1/EX1.5/EX1_5.sce
@@ -0,0 +1,18 @@
+//Chapter 1, Example 1.5
+
+clc
+//Initialisation
+r1=10 //resistance in ohm
+r2=20 //resistance in ohm
+r3=15 //resistance in ohm
+r4=25 //resistance in ohm
+
+
+
+
+//Calculation
+r=r1+r2+r3+r4 //resistance in ohm
+
+
+//Results
+printf("Equivalent Resistance, R = %d Ohm",r)
diff --git a/3809/CH1/EX1.6/EX1_6.sce b/3809/CH1/EX1.6/EX1_6.sce
new file mode 100644
index 000000000..6a88d3e00
--- /dev/null
+++ b/3809/CH1/EX1.6/EX1_6.sce
@@ -0,0 +1,17 @@
+//Chapter 1, Example 1.6
+
+clc
+//Initialisation
+r1=10 //resistance in ohm
+r2=20 //resistance in ohm
+
+
+
+
+
+//Calculation
+r=(r1*r2)/(r1+r2) //resistance in ohm
+
+
+//Results
+printf("Equivalent Resistance, R = %.2f Ohm",r)
diff --git a/3809/CH1/EX1.7/EX1_7.sce b/3809/CH1/EX1.7/EX1_7.sce
new file mode 100644
index 000000000..9d6d66200
--- /dev/null
+++ b/3809/CH1/EX1.7/EX1_7.sce
@@ -0,0 +1,16 @@
+//Chapter 1, Example 1.7
+
+clc
+//Initialisation
+v1=10 //voltage
+v2=0 //voltage
+r1=200 //resistance in ohm
+r2=300 //resistance in ohm
+
+
+//Calculation
+v=v1*(r2/(r1+r2)) //voltage
+
+
+//Results
+printf("Voltage, V = %d V",v)
diff --git a/3809/CH1/EX1.8/EX1_8.sce b/3809/CH1/EX1.8/EX1_8.sce
new file mode 100644
index 000000000..0fc08ec2b
--- /dev/null
+++ b/3809/CH1/EX1.8/EX1_8.sce
@@ -0,0 +1,16 @@
+//Chapter 1, Example 1.8
+
+clc
+//Initialisation
+v1=15 //voltage
+v2=3 //voltage
+r1=1000 //resistance in ohm
+r2=500 //resistance in ohm
+
+
+//Calculation
+v=v2+((v1-v2)*(r2/(r1+r2))) //voltage
+
+
+//Results
+printf("Voltage, V = %d V",v)
diff --git a/3809/CH1/EX1.9/EX1_9.sce b/3809/CH1/EX1.9/EX1_9.sce
new file mode 100644
index 000000000..b2f991a46
--- /dev/null
+++ b/3809/CH1/EX1.9/EX1_9.sce
@@ -0,0 +1,13 @@
+//Chapter 1, Example 1.9
+
+clc
+//Initialisation
+f=50 //Frequency in Hertz
+
+
+//Calculation
+t=1/f //Time Period in Sec
+
+
+//Results
+printf("Time Period, T = %d ms",(t*1000))