diff options
Diffstat (limited to '3809/CH3')
-rw-r--r-- | 3809/CH3/EX3.1/EX3_1.sce | 14 | ||||
-rw-r--r-- | 3809/CH3/EX3.2/EX3_2.sce | 13 | ||||
-rw-r--r-- | 3809/CH3/EX3.3/EX3_3.sce | 24 | ||||
-rw-r--r-- | 3809/CH3/EX3.4/EX3_4.sce | 14 | ||||
-rw-r--r-- | 3809/CH3/EX3.5/EX3_5.sce | 19 | ||||
-rw-r--r-- | 3809/CH3/EX3.6/EX3_6.sce | 18 | ||||
-rw-r--r-- | 3809/CH3/EX3.7/EX3_7.sce | 20 | ||||
-rw-r--r-- | 3809/CH3/EX3.8/EX3_8.sce | 14 |
8 files changed, 136 insertions, 0 deletions
diff --git a/3809/CH3/EX3.1/EX3_1.sce b/3809/CH3/EX3.1/EX3_1.sce new file mode 100644 index 000000000..c34d993d3 --- /dev/null +++ b/3809/CH3/EX3.1/EX3_1.sce @@ -0,0 +1,14 @@ +//Chapter 3, Example 3.1 + +clc +//Initialisation' +i1=8 //current in amp +i2=1 //current in amp +i3=4 //current in amp + +//Calculation +i4=i3+i2-i1 //current in amp + + +//Results +printf("Current, I4 = %d A",i4) diff --git a/3809/CH3/EX3.2/EX3_2.sce b/3809/CH3/EX3.2/EX3_2.sce new file mode 100644 index 000000000..0a1d8c68f --- /dev/null +++ b/3809/CH3/EX3.2/EX3_2.sce @@ -0,0 +1,13 @@ +//Chapter 3, Example 3.2 + +clc +//Initialisation' +v1=3 //voltage +v3=3 //voltage +e=12 //voltage + +//Calculation +v2=v1+v3-e //voltage + +//Results +printf("Voltage, V = %d V",v2) diff --git a/3809/CH3/EX3.3/EX3_3.sce b/3809/CH3/EX3.3/EX3_3.sce new file mode 100644 index 000000000..ebe8d6bf2 --- /dev/null +++ b/3809/CH3/EX3.3/EX3_3.sce @@ -0,0 +1,24 @@ +//Chapter 3, Example 3.3 +clc +//Initialisation +v1=30 //voltage +r1=10*10**3 //resistance in ohm +r2=10*10**3 //resistance in ohm +r3=10*10**3 //resistance in ohm + +//Calculation +voc=v1/2 //open circuit voltage +r23=(r2*r3)/(r2+r3) //resistance in parallel in ohm +rt=r1+r23 //resistance in ohm +i1=v1/rt //current in ampere +isc=i1/2 //short circuit current in ampere +R=voc/isc //resistance in ohm + + +//Results +printf("For Thevenin Circuit \n") +printf("V = %d V\n",voc) +printf("R = %d kOhm\n\n",R/1000) +printf("For Norton Circuit \n") +printf("I = %d mA\n",isc*1000) +printf("R = %d kOhm",R/1000) 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
diff --git a/3809/CH3/EX3.5/EX3_5.sce b/3809/CH3/EX3.5/EX3_5.sce new file mode 100644 index 000000000..92ed523d6 --- /dev/null +++ b/3809/CH3/EX3.5/EX3_5.sce @@ -0,0 +1,19 @@ +//Chapter 3, Example 3.5 + +clc +//Initialisation' +v1=15 //voltage +v2=20 //voltage +r1=100 //resistance in ohm +r2=200 //resistance in ohm +r3=50 //resistance in ohm + +//Calculation +rp1=(r2*r3)/(r2+r3) //resistance in parallel in ohm +vp1=v1*(rp1/(r1+rp1)) //voltage V2 +rp2=(r1*r3)/(r1+r3) //resistance in parallel in ohm +vp2=v2*(rp2/(r2+rp2)) //voltage V2 +vp=vp1+vp2 // total voltage + +//Results +printf("Voltage, V = %.2f V",vp) diff --git a/3809/CH3/EX3.6/EX3_6.sce b/3809/CH3/EX3.6/EX3_6.sce new file mode 100644 index 000000000..fd73e176f --- /dev/null +++ b/3809/CH3/EX3.6/EX3_6.sce @@ -0,0 +1,18 @@ +//Chapter 3, Example 3.6 + +clc +//Initialisation' +v1=5 //voltage +i=2 //current in ampere +r1=10 //resistance in ohm +r2=5 //resistance in ohm + +//Calculation +i1=v1/(r1+r2) //current in ampere +r=(r1*r2)/(r1+r2) //resistance in ohm +v=i*r //voltage +i2=v/r2 //current in ampere +i3=i1+i2 //current in ampere + +//Results +printf("Current, I = %.2f A",i3) diff --git a/3809/CH3/EX3.7/EX3_7.sce b/3809/CH3/EX3.7/EX3_7.sce new file mode 100644 index 000000000..a359f20e8 --- /dev/null +++ b/3809/CH3/EX3.7/EX3_7.sce @@ -0,0 +1,20 @@ +//Chapter 3, Example 3.7 +clc +//Initialisation +v1=50 //voltage +v2=15 //voltage +v3=100 //voltage +r1=10 //resistance in ohm +r2=20 //resistance in ohm +r3=30 //resistance in ohm +r4=25 //resistance in ohm + +//Calculation +//by making a two linear equations, and solving them by matrix method +a=[(-13/60) (1/20);(1/60) (-9/100)] +b=[-5;(-100/30)] +x=a\b +I1=x(2)/25 //current in ampere + +//Results +printf("Current, I1 = %.1f A",I1) 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)
|