summaryrefslogtreecommitdiff
path: root/1445
diff options
context:
space:
mode:
Diffstat (limited to '1445')
-rw-r--r--1445/CH1/EX1.1/Ex1_1.sce1
-rw-r--r--1445/CH1/EX1.10/Ex1_10.sce1
-rw-r--r--1445/CH1/EX1.11/Ex1_11.sce1
-rw-r--r--1445/CH1/EX1.12/Ex1_12.sce1
-rw-r--r--1445/CH1/EX1.13/Ex1_13.sce1
-rw-r--r--1445/CH1/EX1.14/Ex1_14.sce1
-rw-r--r--1445/CH1/EX1.15/Ex1_15.sce1
-rw-r--r--1445/CH1/EX1.16/Ex1_16.sce1
-rw-r--r--1445/CH1/EX1.17/Ex1_17.sce1
-rw-r--r--1445/CH1/EX1.18/Ex1_18.sce1
-rw-r--r--1445/CH1/EX1.19/Ex1_19.sce1
-rw-r--r--1445/CH1/EX1.2/Ex1_2.sce3
-rw-r--r--1445/CH1/EX1.20/Ex1_20.sce3
-rw-r--r--1445/CH1/EX1.21/Ex1_21.sce3
-rw-r--r--1445/CH1/EX1.22/Ex1_22.sce3
-rw-r--r--1445/CH1/EX1.23/Ex1_23.sce3
-rw-r--r--1445/CH1/EX1.24/Ex1_24.sce5
-rw-r--r--1445/CH1/EX1.25/Ex1_25.sce1
-rw-r--r--1445/CH1/EX1.26/Ex1_26.sce1
-rw-r--r--1445/CH1/EX1.27/Ex1_27.sce1
-rw-r--r--1445/CH1/EX1.28/Ex1_28.sce1
-rw-r--r--1445/CH1/EX1.29/Ex1_29.sce1
-rw-r--r--1445/CH1/EX1.3/Ex1_3.sce3
-rw-r--r--1445/CH1/EX1.30/Ex1_30.sce1
-rw-r--r--1445/CH1/EX1.31/Ex1_31.sce1
-rw-r--r--1445/CH1/EX1.32/Ex1_32.sce3
-rw-r--r--1445/CH1/EX1.33/Ex1_33.sce5
-rw-r--r--1445/CH1/EX1.34/Ex1_34.sce3
-rw-r--r--1445/CH1/EX1.35/Ex1_35.sce5
-rw-r--r--1445/CH1/EX1.36/Ex1_36.sce3
-rw-r--r--1445/CH1/EX1.37/Ex1_37.sce9
-rw-r--r--1445/CH1/EX1.38/Ex1_38.sce7
-rw-r--r--1445/CH1/EX1.39/Ex1_39.sce1
-rw-r--r--1445/CH1/EX1.4/Ex1_4.sce7
-rw-r--r--1445/CH1/EX1.40/Ex1_40.sce3
-rw-r--r--1445/CH1/EX1.41/Ex1_41.sce1
-rw-r--r--1445/CH1/EX1.42/Ex1_42.sce5
-rw-r--r--1445/CH1/EX1.43/Ex1_43.sce10
-rw-r--r--1445/CH1/EX1.44/Ex1_44.sce1
-rw-r--r--1445/CH1/EX1.45/Ex1_45.sce1
-rw-r--r--1445/CH1/EX1.46/Ex1_46.sce1
-rw-r--r--1445/CH1/EX1.47/Ex1_47.sce1
-rw-r--r--1445/CH1/EX1.48/Ex1_48.sce7
-rw-r--r--1445/CH1/EX1.49/Ex1_49.sce9
-rw-r--r--1445/CH1/EX1.5/Ex1_5.sce5
-rw-r--r--1445/CH1/EX1.50/Ex1_50.sce5
-rw-r--r--1445/CH1/EX1.51/Ex1_51.sce7
-rw-r--r--1445/CH1/EX1.52/Ex1_52.sce10
-rw-r--r--1445/CH1/EX1.53/Ex1_53.sce1
-rw-r--r--1445/CH1/EX1.54/Ex1_54.sce3
-rw-r--r--1445/CH1/EX1.55/Ex1_55.sce3
-rw-r--r--1445/CH1/EX1.56/Ex1_56.sce3
-rw-r--r--1445/CH1/EX1.57/Ex1_57.sce5
-rw-r--r--1445/CH1/EX1.58/Ex1_58.sce1
-rw-r--r--1445/CH1/EX1.59/Ex1_59.sce1
-rw-r--r--1445/CH1/EX1.6/Ex1_6.sce1
-rw-r--r--1445/CH1/EX1.7/Ex1_7.sce9
-rw-r--r--1445/CH1/EX1.8/Ex1_8.sce3
-rw-r--r--1445/CH1/EX1.9/Ex1_9.sce3
-rw-r--r--1445/CH10/EX10.10/Ex10_10.sce3
-rw-r--r--1445/CH10/EX10.11/Ex10_11.sce3
-rw-r--r--1445/CH10/EX10.12/Ex10_12.sce7
-rw-r--r--1445/CH10/EX10.13/Ex10_13.sce11
-rw-r--r--1445/CH10/EX10.14/Ex10_14.sce20
-rw-r--r--1445/CH10/EX10.15/Ex10_15.sce4
-rw-r--r--1445/CH10/EX10.16/Ex10_16.sce11
-rw-r--r--1445/CH10/EX10.2/Ex10_2.sce9
-rw-r--r--1445/CH10/EX10.3/Ex10_3.sce5
-rw-r--r--1445/CH10/EX10.4/Ex10_4.sce7
-rw-r--r--1445/CH10/EX10.5/Ex10_5.sce1
-rw-r--r--1445/CH10/EX10.6/Ex10_6.sce3
-rw-r--r--1445/CH10/EX10.7/Ex10_7.sce13
-rw-r--r--1445/CH10/EX10.8/Ex10_8.sce3
-rw-r--r--1445/CH10/EX10.9/Ex10_9.sce5
-rw-r--r--1445/CH11/EX11.1/Ex11_1.sce3
-rw-r--r--1445/CH11/EX11.2/Ex11_2.sce7
-rw-r--r--1445/CH2/EX2.1/Ex2_1.sce17
-rw-r--r--1445/CH2/EX2.10/Ex2_10.sce11
-rw-r--r--1445/CH2/EX2.11/Ex2_11.sce31
-rw-r--r--1445/CH2/EX2.13/Ex2_13.sce37
-rw-r--r--1445/CH2/EX2.14/Ex2_14.sce30
-rw-r--r--1445/CH2/EX2.15/Ex2_15.sce57
-rw-r--r--1445/CH2/EX2.16/Ex2_16.sce49
-rw-r--r--1445/CH2/EX2.17/Ex2_17.sce31
-rw-r--r--1445/CH2/EX2.18/Ex2_18.sce21
-rw-r--r--1445/CH2/EX2.19/Ex2_19.sce59
-rw-r--r--1445/CH2/EX2.20/Ex2_20.sce9
-rw-r--r--1445/CH2/EX2.22/Ex2_22.sce28
-rw-r--r--1445/CH2/EX2.23/Ex2_23.sce24
-rw-r--r--1445/CH2/EX2.24/Ex2_24.sce9
-rw-r--r--1445/CH2/EX2.25/Ex2_25.sce14
-rw-r--r--1445/CH2/EX2.26/Ex2_26.sce17
-rw-r--r--1445/CH2/EX2.27/Ex2_27.sce13
-rw-r--r--1445/CH2/EX2.28/Ex2_28.sce42
-rw-r--r--1445/CH2/EX2.29/Ex2_29.sce8
-rw-r--r--1445/CH2/EX2.3/Ex2_3.sce15
-rw-r--r--1445/CH2/EX2.30/Ex2_30.sce9
-rw-r--r--1445/CH2/EX2.31/Ex2_31.sce5
-rw-r--r--1445/CH2/EX2.32/Ex2_32.sce7
-rw-r--r--1445/CH2/EX2.33/Ex2_33.sce15
-rw-r--r--1445/CH2/EX2.34/Ex2_34.sce9
-rw-r--r--1445/CH2/EX2.35/Ex2_35.sce17
-rw-r--r--1445/CH2/EX2.36/Ex2_36.sce15
-rw-r--r--1445/CH2/EX2.37/Ex2_37.sce11
-rw-r--r--1445/CH2/EX2.38/Ex2_38.sce8
-rw-r--r--1445/CH2/EX2.39/Ex2_39.sce23
-rw-r--r--1445/CH2/EX2.4/Ex2_4.sce8
-rw-r--r--1445/CH2/EX2.40/Ex2_40.sce12
-rw-r--r--1445/CH2/EX2.41/Ex2_41.sce7
-rw-r--r--1445/CH2/EX2.42/Ex2_42.sce31
-rw-r--r--1445/CH2/EX2.43/Ex2_43.sce5
-rw-r--r--1445/CH2/EX2.44/Ex2_44.sce8
-rw-r--r--1445/CH2/EX2.45/Ex2_45.sce24
-rw-r--r--1445/CH2/EX2.46/Ex2_46.sce13
-rw-r--r--1445/CH2/EX2.47/Ex2_47.sce13
-rw-r--r--1445/CH2/EX2.48/Ex2_48.sce4
-rw-r--r--1445/CH2/EX2.49/Ex2_49.sce15
-rw-r--r--1445/CH2/EX2.5/Ex2_5.sce26
-rw-r--r--1445/CH2/EX2.50/Ex2_50.sce21
-rw-r--r--1445/CH2/EX2.51/Ex2_51.sce21
-rw-r--r--1445/CH2/EX2.52/Ex2_52.sce17
-rw-r--r--1445/CH2/EX2.53/Ex2_53.sce13
-rw-r--r--1445/CH2/EX2.54/Ex2_54.sce13
-rw-r--r--1445/CH2/EX2.6/Ex2_6.sce14
-rw-r--r--1445/CH2/EX2.7/Ex2_7.sce15
-rw-r--r--1445/CH2/EX2.8/Ex2_8.sce23
-rw-r--r--1445/CH2/EX2.9/Ex2_9.sce24
-rw-r--r--1445/CH3/EX3.1/Ex3_1.sce15
-rw-r--r--1445/CH3/EX3.11/Ex3_11.sce19
-rw-r--r--1445/CH3/EX3.12/Ex3_12.sce9
-rw-r--r--1445/CH3/EX3.2/Ex3_2.sce5
-rw-r--r--1445/CH3/EX3.3/Ex3_3.sce9
-rw-r--r--1445/CH3/EX3.4/Ex3_4.sce13
-rw-r--r--1445/CH3/EX3.5/Ex3_5.sce3
-rw-r--r--1445/CH3/EX3.6/Ex3_6.sce9
-rw-r--r--1445/CH3/EX3.7/Ex3_7.sce3
-rw-r--r--1445/CH3/EX3.8/Ex3_8.sce11
-rw-r--r--1445/CH4/EX4.1/Ex4_1.sce3
-rw-r--r--1445/CH4/EX4.10/Ex4_10.sce1
-rw-r--r--1445/CH4/EX4.11/Ex4_11.sce1
-rw-r--r--1445/CH4/EX4.12/Ex4_12.sce1
-rw-r--r--1445/CH4/EX4.2/Ex4_2.sce3
-rw-r--r--1445/CH4/EX4.3/Ex4_3.sce3
-rw-r--r--1445/CH4/EX4.4/Ex4_4.sce5
-rw-r--r--1445/CH4/EX4.5/Ex4_5.sce5
-rw-r--r--1445/CH4/EX4.6/Ex4_6.sce3
-rw-r--r--1445/CH4/EX4.7/Ex4_7.sce5
-rw-r--r--1445/CH4/EX4.8/Ex4_8.sce5
-rw-r--r--1445/CH4/EX4.9/Ex4_9.sce3
-rw-r--r--1445/CH6/EX6.1/Ex6_1.sce13
-rw-r--r--1445/CH6/EX6.2/Ex6_2.sce11
-rw-r--r--1445/CH6/EX6.3/Ex6_3.sce1
-rw-r--r--1445/CH6/EX6.4/Ex6_4.sce7
-rw-r--r--1445/CH6/EX6.5/Ex6_5.sce3
-rw-r--r--1445/CH7/EX7.1/Ex7_1.sce1
-rw-r--r--1445/CH7/EX7.10/Ex7_10.sce1
-rw-r--r--1445/CH7/EX7.11/Ex7_11.sce1
-rw-r--r--1445/CH7/EX7.12/Ex7_12.sce1
-rw-r--r--1445/CH7/EX7.13/Ex7_13.sce1
-rw-r--r--1445/CH7/EX7.14/Ex7_14.sce1
-rw-r--r--1445/CH7/EX7.15/Ex7_15.sce1
-rw-r--r--1445/CH7/EX7.16/Ex7_16.sce1
-rw-r--r--1445/CH7/EX7.17/Ex7_17.sce1
-rw-r--r--1445/CH7/EX7.18/Ex7_18.sce1
-rw-r--r--1445/CH7/EX7.19/Ex7_19.sce1
-rw-r--r--1445/CH7/EX7.2/Ex7_2.sce1
-rw-r--r--1445/CH7/EX7.20/Ex7_20.sce1
-rw-r--r--1445/CH7/EX7.21/Ex7_21.sce1
-rw-r--r--1445/CH7/EX7.22/Ex7_22.sce1
-rw-r--r--1445/CH7/EX7.23/Ex7_23.sce1
-rw-r--r--1445/CH7/EX7.24/Ex7_24.sce1
-rw-r--r--1445/CH7/EX7.25/Ex7_25.sce1
-rw-r--r--1445/CH7/EX7.26/Ex7_26.sce1
-rw-r--r--1445/CH7/EX7.27/Ex7_27.sce1
-rw-r--r--1445/CH7/EX7.28/Ex7_28.sce1
-rw-r--r--1445/CH7/EX7.29/Ex7_29.sce1
-rw-r--r--1445/CH7/EX7.3/Ex7_3.sce1
-rw-r--r--1445/CH7/EX7.30/Ex7_30.sce1
-rw-r--r--1445/CH7/EX7.31/Ex7_31.sce1
-rw-r--r--1445/CH7/EX7.32/Ex7_32.sce1
-rw-r--r--1445/CH7/EX7.33/Ex7_33.sce1
-rw-r--r--1445/CH7/EX7.34/Ex7_34.sce1
-rw-r--r--1445/CH7/EX7.35/Ex7_35.sce1
-rw-r--r--1445/CH7/EX7.36/Ex7_36.sce1
-rw-r--r--1445/CH7/EX7.37/Ex7_37.sce1
-rw-r--r--1445/CH7/EX7.38/Ex7_38.sce1
-rw-r--r--1445/CH7/EX7.39/Ex7_39.sce1
-rw-r--r--1445/CH7/EX7.4/Ex7_4.sce1
-rw-r--r--1445/CH7/EX7.40/Ex7_40.sce1
-rw-r--r--1445/CH7/EX7.41/Ex7_41.sce1
-rw-r--r--1445/CH7/EX7.5/Ex7_5.sce1
-rw-r--r--1445/CH7/EX7.6/Ex7_6.sce1
-rw-r--r--1445/CH7/EX7.8/Ex7_8.sce1
-rw-r--r--1445/CH7/EX7.9/Ex7_9.sce1
-rw-r--r--1445/CH8/EX8.1/Ex8_1.sce8
-rw-r--r--1445/CH8/EX8.10/Ex8_10.sce32
-rw-r--r--1445/CH8/EX8.11/Ex8_11.sce10
-rw-r--r--1445/CH8/EX8.12/Ex8_12.sce8
-rw-r--r--1445/CH8/EX8.13/Ex8_13.sce8
-rw-r--r--1445/CH8/EX8.14/Ex8_14.sce12
-rw-r--r--1445/CH8/EX8.15/Ex8_15.sce10
-rw-r--r--1445/CH8/EX8.16/Ex8_16.sce35
-rw-r--r--1445/CH8/EX8.17/Ex8_17.sce37
-rw-r--r--1445/CH8/EX8.18/Ex8_18.sce16
-rw-r--r--1445/CH8/EX8.19/Ex8_19.sce10
-rw-r--r--1445/CH8/EX8.2/Ex8_2.sce14
-rw-r--r--1445/CH8/EX8.20/Ex8_20.sce36
-rw-r--r--1445/CH8/EX8.21/Ex8_21.sce25
-rw-r--r--1445/CH8/EX8.22/Ex8_22.sce15
-rw-r--r--1445/CH8/EX8.23/Ex8_23.sce20
-rw-r--r--1445/CH8/EX8.24/Ex8_24.sce1
-rw-r--r--1445/CH8/EX8.25/Ex8_25.sce23
-rw-r--r--1445/CH8/EX8.27/Ex8_27.sce10
-rw-r--r--1445/CH8/EX8.28/Ex8_28.sce5
-rw-r--r--1445/CH8/EX8.29/Ex8_29.sce6
-rw-r--r--1445/CH8/EX8.3/Ex8_3.sce14
-rw-r--r--1445/CH8/EX8.30/Ex8_30.sce13
-rw-r--r--1445/CH8/EX8.31/Ex8_31.sce9
-rw-r--r--1445/CH8/EX8.32/Ex8_32.sce50
-rw-r--r--1445/CH8/EX8.33/Ex8_33.sce27
-rw-r--r--1445/CH8/EX8.34/Ex8_34.sce12
-rw-r--r--1445/CH8/EX8.35/Ex8_35.sce12
-rw-r--r--1445/CH8/EX8.36/Ex8_36.sce18
-rw-r--r--1445/CH8/EX8.37/Ex8_37.sce2
-rw-r--r--1445/CH8/EX8.38/Ex8_38.sce12
-rw-r--r--1445/CH8/EX8.4/Ex8_4.sce14
-rw-r--r--1445/CH8/EX8.5/Ex8_5.sce28
-rw-r--r--1445/CH8/EX8.6/Ex8_6.sce21
-rw-r--r--1445/CH8/EX8.7/Ex8_7.sce7
-rw-r--r--1445/CH8/EX8.8/Ex8_8.sce33
-rw-r--r--1445/CH8/EX8.9/Ex8_9.sce11
231 files changed, 986 insertions, 1113 deletions
diff --git a/1445/CH1/EX1.1/Ex1_1.sce b/1445/CH1/EX1.1/Ex1_1.sce
index 35c637d9c..c5f3a02b5 100644
--- a/1445/CH1/EX1.1/Ex1_1.sce
+++ b/1445/CH1/EX1.1/Ex1_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 1
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 1");
diff --git a/1445/CH1/EX1.10/Ex1_10.sce b/1445/CH1/EX1.10/Ex1_10.sce
index 4bd8f0826..b7100f760 100644
--- a/1445/CH1/EX1.10/Ex1_10.sce
+++ b/1445/CH1/EX1.10/Ex1_10.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 10
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 10");
diff --git a/1445/CH1/EX1.11/Ex1_11.sce b/1445/CH1/EX1.11/Ex1_11.sce
index f78a7b4a2..c80b69e32 100644
--- a/1445/CH1/EX1.11/Ex1_11.sce
+++ b/1445/CH1/EX1.11/Ex1_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 11
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 11");
diff --git a/1445/CH1/EX1.12/Ex1_12.sce b/1445/CH1/EX1.12/Ex1_12.sce
index 6ca51aa27..17b07e3de 100644
--- a/1445/CH1/EX1.12/Ex1_12.sce
+++ b/1445/CH1/EX1.12/Ex1_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 12
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 12");
diff --git a/1445/CH1/EX1.13/Ex1_13.sce b/1445/CH1/EX1.13/Ex1_13.sce
index abd93a4fc..945b90242 100644
--- a/1445/CH1/EX1.13/Ex1_13.sce
+++ b/1445/CH1/EX1.13/Ex1_13.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 13
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 13");
diff --git a/1445/CH1/EX1.14/Ex1_14.sce b/1445/CH1/EX1.14/Ex1_14.sce
index dc2c6f076..c470ba87f 100644
--- a/1445/CH1/EX1.14/Ex1_14.sce
+++ b/1445/CH1/EX1.14/Ex1_14.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 14
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 14");
diff --git a/1445/CH1/EX1.15/Ex1_15.sce b/1445/CH1/EX1.15/Ex1_15.sce
index ec612db54..bfc4ea9e3 100644
--- a/1445/CH1/EX1.15/Ex1_15.sce
+++ b/1445/CH1/EX1.15/Ex1_15.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 15
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 15");
diff --git a/1445/CH1/EX1.16/Ex1_16.sce b/1445/CH1/EX1.16/Ex1_16.sce
index ce11db243..91fa9c198 100644
--- a/1445/CH1/EX1.16/Ex1_16.sce
+++ b/1445/CH1/EX1.16/Ex1_16.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 16
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 16");
diff --git a/1445/CH1/EX1.17/Ex1_17.sce b/1445/CH1/EX1.17/Ex1_17.sce
index 46d6a28bf..26afafefc 100644
--- a/1445/CH1/EX1.17/Ex1_17.sce
+++ b/1445/CH1/EX1.17/Ex1_17.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 17
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 17");
diff --git a/1445/CH1/EX1.18/Ex1_18.sce b/1445/CH1/EX1.18/Ex1_18.sce
index 3dec1c69c..4c51456e7 100644
--- a/1445/CH1/EX1.18/Ex1_18.sce
+++ b/1445/CH1/EX1.18/Ex1_18.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 18
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 18");
diff --git a/1445/CH1/EX1.19/Ex1_19.sce b/1445/CH1/EX1.19/Ex1_19.sce
index 990af1202..0b567f288 100644
--- a/1445/CH1/EX1.19/Ex1_19.sce
+++ b/1445/CH1/EX1.19/Ex1_19.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 19
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 19");
diff --git a/1445/CH1/EX1.2/Ex1_2.sce b/1445/CH1/EX1.2/Ex1_2.sce
index d9885ec94..f0d94a250 100644
--- a/1445/CH1/EX1.2/Ex1_2.sce
+++ b/1445/CH1/EX1.2/Ex1_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 2
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 2");
@@ -27,7 +28,7 @@ req3=req1+req2; //series combination of resistors
req4=(req3*rac)/(req3+rac); //parallel combination of resistors
req5=req4+r3;
req6=(req5*7)/(req5+7);
-disp(sprintf("The eqivalent resistance between points A and B is %.2f Ω",req6));
+disp(sprintf("The eqivalent resistance between points A and B is %f Ω",req6));
//END
diff --git a/1445/CH1/EX1.20/Ex1_20.sce b/1445/CH1/EX1.20/Ex1_20.sce
index 0255e39d2..1c1bcfc00 100644
--- a/1445/CH1/EX1.20/Ex1_20.sce
+++ b/1445/CH1/EX1.20/Ex1_20.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 20
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 20");
@@ -27,6 +28,6 @@ I2=x(1,:); //to access the 1st element of 2X1 matrix
I3=x(2,:); //to access the 2nd element of 2X1 matrix
In=I3;
I=(rn*In)/(rn+r4);
-disp(sprintf("By Norton Theorem, the value of I is %.3f A",I));
+disp(sprintf("By Norton Theorem, the value of I is %f A",I));
//END
diff --git a/1445/CH1/EX1.21/Ex1_21.sce b/1445/CH1/EX1.21/Ex1_21.sce
index 6529af7b8..1f9555d91 100644
--- a/1445/CH1/EX1.21/Ex1_21.sce
+++ b/1445/CH1/EX1.21/Ex1_21.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 21
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 21");
@@ -30,6 +31,6 @@ v1=x(1,:); //to access the 1st element of 2X1 matrix
v2=x(2,:); //to access the 2nd element of 2X1 matrix
vth=v2; //Thevenin voltage
I=vth/(rth+r4); //Thevenin current
-disp(sprintf("By Thevenin Theorem, the value of I is %.3f A",I));
+disp(sprintf("By Thevenin Theorem, the value of I is %f A",I));
//END
diff --git a/1445/CH1/EX1.22/Ex1_22.sce b/1445/CH1/EX1.22/Ex1_22.sce
index 5f8a39459..dfd0486b2 100644
--- a/1445/CH1/EX1.22/Ex1_22.sce
+++ b/1445/CH1/EX1.22/Ex1_22.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 22
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 22");
@@ -25,6 +26,6 @@ x=inv(A)*b;
I2=x(1,:); //to access the 1st element of 2X1 matrix
I3=x(2,:); //to access the 2nd element of 2X1 matrix
I=I3;
-disp(sprintf("By mesh analysis, the value of I is %.3f A",I));
+disp(sprintf("By mesh analysis, the value of I is %f A",I));
//END
diff --git a/1445/CH1/EX1.23/Ex1_23.sce b/1445/CH1/EX1.23/Ex1_23.sce
index b94474269..c1f1ea289 100644
--- a/1445/CH1/EX1.23/Ex1_23.sce
+++ b/1445/CH1/EX1.23/Ex1_23.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 23
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 23");
@@ -22,6 +23,6 @@ b=[110;40];
x=inv(A)*b;
I2=x(1,:); //to access the 1st element of 2X1 matrix
I3=x(2,:); //to access the 2nd element of 2X1 matrix
-disp(sprintf("By Nodal analysis, the value of I is %.3f A",I3));
+disp(sprintf("By Nodal analysis, the value of I is %f A",I3));
//END
diff --git a/1445/CH1/EX1.24/Ex1_24.sce b/1445/CH1/EX1.24/Ex1_24.sce
index 1bb5528b5..7b9fc864e 100644
--- a/1445/CH1/EX1.24/Ex1_24.sce
+++ b/1445/CH1/EX1.24/Ex1_24.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 24
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 24");
@@ -17,7 +18,7 @@ r4=12; //in Ohms
//activating 20A current source
r=r2+((r3*r4)/(r3+r4));
-I1=(r*I1)/(r+r1);
+I1=(r*I)/(r+r1);
I_20=(r3*I1)/(r3+r4);
//activating 10V battery source
@@ -29,6 +30,6 @@ I_10=v_10/r4;
v_40=(v2/r3)/((1/req)+(1/r3)+(1/r4));
I_40=v_40/r4;
I_tot=I_20+I_10+I_40;
-disp(sprintf("By Superposition Theorem, the value of I is .3%f A",I_tot));
+disp(sprintf("By Superposition Theorem, the value of I is %f A",I_tot));
//END
diff --git a/1445/CH1/EX1.25/Ex1_25.sce b/1445/CH1/EX1.25/Ex1_25.sce
index e1c250c68..99feda818 100644
--- a/1445/CH1/EX1.25/Ex1_25.sce
+++ b/1445/CH1/EX1.25/Ex1_25.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 25
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 25");
diff --git a/1445/CH1/EX1.26/Ex1_26.sce b/1445/CH1/EX1.26/Ex1_26.sce
index 18b2768c4..e73358189 100644
--- a/1445/CH1/EX1.26/Ex1_26.sce
+++ b/1445/CH1/EX1.26/Ex1_26.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 26
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 26");
diff --git a/1445/CH1/EX1.27/Ex1_27.sce b/1445/CH1/EX1.27/Ex1_27.sce
index e4aa7816d..847f14639 100644
--- a/1445/CH1/EX1.27/Ex1_27.sce
+++ b/1445/CH1/EX1.27/Ex1_27.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 27
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 27");
diff --git a/1445/CH1/EX1.28/Ex1_28.sce b/1445/CH1/EX1.28/Ex1_28.sce
index 2391711a6..e83ad9418 100644
--- a/1445/CH1/EX1.28/Ex1_28.sce
+++ b/1445/CH1/EX1.28/Ex1_28.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 28
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 28");
diff --git a/1445/CH1/EX1.29/Ex1_29.sce b/1445/CH1/EX1.29/Ex1_29.sce
index 319e202f9..b084e57a8 100644
--- a/1445/CH1/EX1.29/Ex1_29.sce
+++ b/1445/CH1/EX1.29/Ex1_29.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 29
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 29");
diff --git a/1445/CH1/EX1.3/Ex1_3.sce b/1445/CH1/EX1.3/Ex1_3.sce
index fdaccbce2..fb42a65be 100644
--- a/1445/CH1/EX1.3/Ex1_3.sce
+++ b/1445/CH1/EX1.3/Ex1_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 3
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 3");
@@ -29,7 +30,7 @@ req4=req2+req3;
req5=(req1*req4)/(req1+req4); //parallel combination of resistors
req6=req5+r1; //series combination of resistors
req7=(req6*r2)/(req6+r2);
-disp(sprintf("The equivalent resistance between points A and B is %.2f Ω",req7));
+disp(sprintf("The equivalent resistance between points A and B is %f Ω",req7));
//END
diff --git a/1445/CH1/EX1.30/Ex1_30.sce b/1445/CH1/EX1.30/Ex1_30.sce
index 54c39d141..1fd28a01f 100644
--- a/1445/CH1/EX1.30/Ex1_30.sce
+++ b/1445/CH1/EX1.30/Ex1_30.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 30
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 30");
diff --git a/1445/CH1/EX1.31/Ex1_31.sce b/1445/CH1/EX1.31/Ex1_31.sce
index fd519c1c9..b52103d08 100644
--- a/1445/CH1/EX1.31/Ex1_31.sce
+++ b/1445/CH1/EX1.31/Ex1_31.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 31
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 31");
diff --git a/1445/CH1/EX1.32/Ex1_32.sce b/1445/CH1/EX1.32/Ex1_32.sce
index c8b992869..972974aba 100644
--- a/1445/CH1/EX1.32/Ex1_32.sce
+++ b/1445/CH1/EX1.32/Ex1_32.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 32
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 32");
@@ -23,7 +24,7 @@ A=[10 -4 0;-4 9 -4;0 -4 8];
b=[50;0;10];
x=inv(A)*b;
I2=x(2,:); //to access the 2nd element of 3X1 matrix
-disp(sprintf("By Mesh analysis, the current through 1Ω resistor is %.2f A",I2));
+disp(sprintf("By Mesh analysis, the current through 1Ω resistor is %f A",I2));
//END
diff --git a/1445/CH1/EX1.33/Ex1_33.sce b/1445/CH1/EX1.33/Ex1_33.sce
index 60903ad05..87358b038 100644
--- a/1445/CH1/EX1.33/Ex1_33.sce
+++ b/1445/CH1/EX1.33/Ex1_33.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 33
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 33");
@@ -27,10 +28,10 @@ v1=x(1,:); //to access the 1st element of 2X1 matrix
v2=x(2,:); //to access the 1st element of 2X1 matrix
if(v1>v2) then
I=(v1-v2)/r5;
-disp(sprintf("By nodal analysis, the current through 1Ω resistor is %.3f A",I));
+disp(sprintf("By nodal analysis, the current through 1Ω resistor is %f A",I));
else
I=(v2-v1)/r5;
-disp(sprintf("By nodal analysis, the current through 1Ω resistor is %.3f A",I));
+disp(sprintf("By nodal analysis, the current through 1Ω resistor is %f A",I));
end;
//END
diff --git a/1445/CH1/EX1.34/Ex1_34.sce b/1445/CH1/EX1.34/Ex1_34.sce
index 2b8ba28a7..9e302d00b 100644
--- a/1445/CH1/EX1.34/Ex1_34.sce
+++ b/1445/CH1/EX1.34/Ex1_34.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 34
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 34");
@@ -46,6 +47,6 @@ I2=(v4-v3)/r5;
end;
I_tot=I1+I2;
-disp(sprintf("By Superposition Theorem, the current through 1Ω resistor is %.3f A",I_tot));
+disp(sprintf("By Superposition Theorem, the current through 1Ω resistor is %f A",I_tot));
//END
diff --git a/1445/CH1/EX1.35/Ex1_35.sce b/1445/CH1/EX1.35/Ex1_35.sce
index 453b01ba6..1aa71dd92 100644
--- a/1445/CH1/EX1.35/Ex1_35.sce
+++ b/1445/CH1/EX1.35/Ex1_35.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 35
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 35");
@@ -22,6 +23,6 @@ req1=(r1*r4)/(r1+r4);
req2=(r2*r3)/(r2+r3);
rth=req1+req2;
Ith=vth/(rth+r5);
-disp(sprintf("By Thevenin Theorem, the current through the 1Ω resistor is %.3f A",Ith));
+disp(sprintf("By Thevenins Theorem, the current through the 1Ω resistor is %f A",Ith));
-//END
+//END \ No newline at end of file
diff --git a/1445/CH1/EX1.36/Ex1_36.sce b/1445/CH1/EX1.36/Ex1_36.sce
index 86044a5a5..77e862b3d 100644
--- a/1445/CH1/EX1.36/Ex1_36.sce
+++ b/1445/CH1/EX1.36/Ex1_36.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 36
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 36");
@@ -25,6 +26,6 @@ req1=(r1*r4)/(r1+r4);
req2=(r2*r3)/(r2+r3);
rn=req1+req2;
I1=(rn*In)/(rn+r5);
-disp(sprintf("By Norton Theorem, the current through 1Ω resistor is %.3f A",I1));
+disp(sprintf("By Norton Theorem, the current through 1Ω resistor is %f A",I1));
//END
diff --git a/1445/CH1/EX1.37/Ex1_37.sce b/1445/CH1/EX1.37/Ex1_37.sce
index b7eb9f63a..fd324d1c1 100644
--- a/1445/CH1/EX1.37/Ex1_37.sce
+++ b/1445/CH1/EX1.37/Ex1_37.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 37
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 37");
@@ -29,7 +30,7 @@ req2=req1+r4;
req3=(req2*r6)/(req2+r6);
rth=req3+r2;
vab1=(vth*r3)/(rth+r3);
-disp(sprintf("By Thevenin Theorem, the value of Vab is %.2f V",vab1));
+disp(sprintf("By Thevenins Theorem, the value of Vab is %f V",vab1));
//solution (ii): using Norton's Theorem
//(13)v1+(-7)v2=270.........eq (1) //applying nodal analysis at node 1
@@ -44,11 +45,11 @@ req2=req1+r4;
req3=(req2*r6)/(req2+r6);
rN=req3+r2;
if(v1>v2) then
-In=(v1-v2)/r2;
+IN=(v1-v2)/r2;
else
IN=(v2-v1)/r2;
end;
vab2=(r3*IN)*(rN/(rth+r3));
-disp(sprintf("By Norton Theorem, the value of Vab is %.2f V",vab2));
+disp(sprintf("By Nortons Theorem, the value of Vab is %f V",vab2));
-//END
+//END \ No newline at end of file
diff --git a/1445/CH1/EX1.38/Ex1_38.sce b/1445/CH1/EX1.38/Ex1_38.sce
index 7cde0f2d3..1332c596e 100644
--- a/1445/CH1/EX1.38/Ex1_38.sce
+++ b/1445/CH1/EX1.38/Ex1_38.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 38
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 38");
@@ -21,7 +22,7 @@ req2=r3+r4;
rth=(req1*req2)/(req1+req2);
disp("THEVENIN EQUIVALENT CIRCUIT IS-");
disp(sprintf(" Thevenin voltage= %d V",vth));
-disp(sprintf(" Thevenin resistance= %.2f Ω",rth));
+disp(sprintf(" Thevenin resistance= %f Ω",rth));
//Norton Equivalent circuit
v1=I/((1/r2)+(1/r4));
@@ -31,7 +32,7 @@ req2=r3+r4;
rn=(req1*req2)/(req1+req2);
Isc=(v1/r4)+v2;
disp("NORTON EQUIVALENT CIRCUIT IS-");
-disp(sprintf(" Norton current= %.3f A",Isc));
-disp(sprintf(" Norton resistance= %.3f Ω",rn));
+disp(sprintf(" Norton current= %f A",Isc));
+disp(sprintf(" Norton resistance= %f Ω",rn));
//END
diff --git a/1445/CH1/EX1.39/Ex1_39.sce b/1445/CH1/EX1.39/Ex1_39.sce
index 237e65eb5..234b48c4e 100644
--- a/1445/CH1/EX1.39/Ex1_39.sce
+++ b/1445/CH1/EX1.39/Ex1_39.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 39
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 39");
diff --git a/1445/CH1/EX1.4/Ex1_4.sce b/1445/CH1/EX1.4/Ex1_4.sce
index b8847eae1..a3f805dc5 100644
--- a/1445/CH1/EX1.4/Ex1_4.sce
+++ b/1445/CH1/EX1.4/Ex1_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 4
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 4");
@@ -23,19 +24,19 @@ req3=req2+(r4+r5);
req4=(req3*r6)/(req3+r6);
req5=req4+r7;
req6=(req5*r8)/(req5+r8);
-disp(sprintf("The eqiuvalent resistance between points a and b is %.2f Ω",req6));
+disp(sprintf("The equivalent resistance between points a and b is %f Ω",req6));
//To find resistance between c and d
req7=r7+r8;
req8=(req7*r6)/(req7+r6);
req9=req2+r5+req8;
req10=(req9*r4)/(req9+r4);
-disp(sprintf("The eqiuvalent resistance between points c and d is %.2f Ω",req10));
+disp(sprintf("The equivalent resistance between points c and d is %f Ω",req10));
//To find resistance between d and e
req11=req2+r4+r5;
req12=(req11*r6)/(req11+r6);
req13=(req12*req7)/(req12+req7);
-disp(sprintf("The eqiuvalent resistance between points d and e is %.2f Ω",req13));
+disp(sprintf("The equivalent resistance between points d and e is %f Ω",req13));
//END
diff --git a/1445/CH1/EX1.40/Ex1_40.sce b/1445/CH1/EX1.40/Ex1_40.sce
index 6f60627ea..593649c4f 100644
--- a/1445/CH1/EX1.40/Ex1_40.sce
+++ b/1445/CH1/EX1.40/Ex1_40.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 40
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 40");
@@ -28,6 +29,6 @@ disp("The currents (in Amperes) flowing in different branches are:");
disp(I1);
disp(I3);
disp(I4);
-disp(sprintf("The total current is %.2f A",I));
+disp(sprintf("The total current is %f A",I));
//END
diff --git a/1445/CH1/EX1.41/Ex1_41.sce b/1445/CH1/EX1.41/Ex1_41.sce
index 53e65b5b2..8362a24e5 100644
--- a/1445/CH1/EX1.41/Ex1_41.sce
+++ b/1445/CH1/EX1.41/Ex1_41.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 41
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 41");
diff --git a/1445/CH1/EX1.42/Ex1_42.sce b/1445/CH1/EX1.42/Ex1_42.sce
index 4d3388dd9..fb7cfdd4e 100644
--- a/1445/CH1/EX1.42/Ex1_42.sce
+++ b/1445/CH1/EX1.42/Ex1_42.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 42
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 42");
@@ -18,7 +19,7 @@ r4=2; //second resistance in Ohms
rth=(r1*r3)/(r1+r3);
vth=v*(r3/(r1+r3)); //Thevenin voltage
R=(40-(56*I))/(24*I); //solving for R directly
-disp(sprintf("(i) By Thevenin Theorem, the value of R is %d Ω",R));
+disp(sprintf("(i) By Thevenins Theorem, the value of R is %d Ω",R));
//v1=(10R+4)/(3R+4)........eq(1) //using nodal analysis at node 1
//v1=1+R...................eq(2) //using nodal analysis at node 2
@@ -37,4 +38,4 @@ else
disp(sprintf("(ii) By Nodal analysis, the value of R is %d Ω",R1));
end;
-//END
+//END \ No newline at end of file
diff --git a/1445/CH1/EX1.43/Ex1_43.sce b/1445/CH1/EX1.43/Ex1_43.sce
index ad30b370f..58c70988e 100644
--- a/1445/CH1/EX1.43/Ex1_43.sce
+++ b/1445/CH1/EX1.43/Ex1_43.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 43
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 43");
@@ -14,12 +15,11 @@ r3=4; //in Ohms
//SOLUTION
req1=34;
-I1=Is2*(r3/req1);
+Ia=Is2*(r3/req1);
req2=24;
Iab=Is1*(req2/req1);
-I=Iab+I1;
+I=Ia+Iab;
vab=I*10;
-disp(sprintf("By Superposition Theorem the voltage Vab is %.3f V",vab));
-
-//END
+disp(sprintf("By Superposition Theorem the voltage Vab is %f V",vab));
+//END \ No newline at end of file
diff --git a/1445/CH1/EX1.44/Ex1_44.sce b/1445/CH1/EX1.44/Ex1_44.sce
index e060456a9..778dba3b5 100644
--- a/1445/CH1/EX1.44/Ex1_44.sce
+++ b/1445/CH1/EX1.44/Ex1_44.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 44
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 44");
diff --git a/1445/CH1/EX1.45/Ex1_45.sce b/1445/CH1/EX1.45/Ex1_45.sce
index 361cfdda5..059820969 100644
--- a/1445/CH1/EX1.45/Ex1_45.sce
+++ b/1445/CH1/EX1.45/Ex1_45.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 45
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 45");
diff --git a/1445/CH1/EX1.46/Ex1_46.sce b/1445/CH1/EX1.46/Ex1_46.sce
index 4623527b7..1122fd99b 100644
--- a/1445/CH1/EX1.46/Ex1_46.sce
+++ b/1445/CH1/EX1.46/Ex1_46.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 46
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 46");
diff --git a/1445/CH1/EX1.47/Ex1_47.sce b/1445/CH1/EX1.47/Ex1_47.sce
index 9b53f1882..af11677f3 100644
--- a/1445/CH1/EX1.47/Ex1_47.sce
+++ b/1445/CH1/EX1.47/Ex1_47.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 47
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 47");
diff --git a/1445/CH1/EX1.48/Ex1_48.sce b/1445/CH1/EX1.48/Ex1_48.sce
index 99933d888..c0f985fa4 100644
--- a/1445/CH1/EX1.48/Ex1_48.sce
+++ b/1445/CH1/EX1.48/Ex1_48.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 48
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 48");
@@ -23,9 +24,9 @@ I1=x(1,:); //to access the 1st element of 2X1 matrix
I2=x(2,:); //to access the 2nd element of 2X1 matrix
I=I1+I2;
pd=I*r3;
-disp(sprintf("Current through B1 is %.2f A",I1));
-disp(sprintf("Current through B2 is %.2f A",I2));
-disp(sprintf("Potential difference across AC is %.2f V",pd));
+disp(sprintf("Current through B1 is %f A",I1));
+disp(sprintf("Current through B2 is %f A",I2));
+disp(sprintf("Potential difference across AC is %f V",pd));
//END
diff --git a/1445/CH1/EX1.49/Ex1_49.sce b/1445/CH1/EX1.49/Ex1_49.sce
index 1691f133c..5f51bf880 100644
--- a/1445/CH1/EX1.49/Ex1_49.sce
+++ b/1445/CH1/EX1.49/Ex1_49.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 49
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 49");
@@ -17,16 +18,16 @@ I1=4; //charging
I2=6; //charging
r1=((v1-v2)-((I1+I2)*r))/I1;
r2=((v1-v3)-((I1+I2)*r))/I2;
-disp(sprintf("(a) R1= %.2f Ω",r1));
-disp(sprintf(" R2= %.2f Ω",r2));
+disp(sprintf("(a) R1= %f Ω",r1));
+disp(sprintf(" R2= %f Ω",r2));
//solution (b)
I1=2; //discharging
I2=20; //charging
r1=((v1-v2)-((I2-I1)*r))/(-I1);
r2=((v1-v3)-((I2-I1)*r))/I2;
-disp(sprintf("(b) R1= %.2f Ω",r1));
-disp(sprintf(" R2= %.2f Ω",r2));
+disp(sprintf("(b) R1= %f Ω",r1));
+disp(sprintf(" R2= %f Ω",r2));
//solution (c)
I1=0;
diff --git a/1445/CH1/EX1.5/Ex1_5.sce b/1445/CH1/EX1.5/Ex1_5.sce
index 01fbb7a42..bb6f8c279 100644
--- a/1445/CH1/EX1.5/Ex1_5.sce
+++ b/1445/CH1/EX1.5/Ex1_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 5
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 5");
@@ -18,7 +19,7 @@ req1=r1+r2;
req2=r1+r4;
req3=(req1*r1)/(req1+r1);
rac=(req3*req2)/(req3+req2);
-disp(sprintf("The eqiuvalent resistance between points a and c is %.2f Ω",rac));
+disp(sprintf("The eqiuvalent resistance between points a and c is %f Ω",rac));
//To find resistance between b and d
//converting delta abc into star with points a, b and c
@@ -34,6 +35,6 @@ rc=(rbc*rac)/r;
req5=rb+rac;
req6=rc+8;
rbd=ra+((req5*req6)/(req5+req6));
-disp(sprintf("The eqiuvalent resistance between points b and d is %.2f Ω",rbd));
+disp(sprintf("The eqiuvalent resistance between points b and d is %f Ω",rbd));
//END
diff --git a/1445/CH1/EX1.50/Ex1_50.sce b/1445/CH1/EX1.50/Ex1_50.sce
index e1ce34a4e..52679906e 100644
--- a/1445/CH1/EX1.50/Ex1_50.sce
+++ b/1445/CH1/EX1.50/Ex1_50.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 50
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 50");
@@ -13,8 +14,8 @@ x=inv(A)*b;
I1=x(1,:); //to access the 1st element of 2X1 matrix
I2=x(2,:); //to access the 2nd element of 2X1 matrix
I=I2-I1;
-disp(sprintf("Current i1 is %.2f A (loop EFAB)",I1));
-disp(sprintf("Current i2 is %.2f A (loop BCDE)",abs(I)));
+disp(sprintf("Current i1 is %f A (loop EFAB)",I1));
+disp(sprintf("Current i2 is %f A (loop BCDE)",abs(I)));
//END
diff --git a/1445/CH1/EX1.51/Ex1_51.sce b/1445/CH1/EX1.51/Ex1_51.sce
index cd7fdbdce..96a8eddf1 100644
--- a/1445/CH1/EX1.51/Ex1_51.sce
+++ b/1445/CH1/EX1.51/Ex1_51.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 51
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 51");
@@ -14,9 +15,9 @@ x=inv(A)*b;
I1=x(1,:); //to access the 1st element of 3X1 matrix
I2=x(2,:); //to access the 2nd element of 3X1 matrix
I3=x(3,:); //to access the 3rd element of 3X1 matrix
-disp(sprintf("Current i1 is %.2f A (loop ABGH)",I1));
-disp(sprintf("Current i2 is %.2f A (loop BCDH)",I2));
-disp(sprintf("Current i3 is %.2f A (loop GDEF)",I3));
+disp(sprintf("Current i1 is %f A (loop ABGH)",I1));
+disp(sprintf("Current i2 is %f A (loop BCDH)",I2));
+disp(sprintf("Current i3 is %f A (loop GDEF)",I3));
//END
diff --git a/1445/CH1/EX1.52/Ex1_52.sce b/1445/CH1/EX1.52/Ex1_52.sce
index c669dfdd1..b77d2dbe8 100644
--- a/1445/CH1/EX1.52/Ex1_52.sce
+++ b/1445/CH1/EX1.52/Ex1_52.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 52
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 52");
@@ -20,7 +21,7 @@ v=v1*(r2/(r1+r2)); //voltage divider law
vab=-v2+(r3*0)+(rth*0)+v;
It=vab/(rth+r4); //current obtained by applying Thevenin's Theorem
Isc=vab/rth;
-disp(sprintf("By Thevenin Theorem, current in the 10Ω resistor is %.2f A",It));
+disp(sprintf("By Thevenins Theorem, current in the 10Ω resistor is %f A",It));
//verification by Norton's Theorem
//(7)I1+(2)I2=20.................eq (1)
@@ -34,13 +35,10 @@ x2=x(2,:); //to access 2nd element of 2X1 matrix and Isc=-x
Isc=-x2; //Isc is negative because its direction is opposite to I2
I=Isc*(rth/(rth+r4)); //current obtained by applying Norton's Theorem
if(It==I)
-disp(sprintf("By Norton Theorem, current in the 10Ω resistor is %.2f A",I));
+disp(sprintf("By Nortons Theorem, current in the 10Ω resistor is %f A",I));
disp(sprintf("Hence, answer is confirmed by Norton Theorem"));
else
disp(sprintf("The answer is not confirmed by Norton Theorem"));
end;
-//END
-
-
-
+//END \ No newline at end of file
diff --git a/1445/CH1/EX1.53/Ex1_53.sce b/1445/CH1/EX1.53/Ex1_53.sce
index 2b20673b7..1c7dd39cf 100644
--- a/1445/CH1/EX1.53/Ex1_53.sce
+++ b/1445/CH1/EX1.53/Ex1_53.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 53
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 53");
diff --git a/1445/CH1/EX1.54/Ex1_54.sce b/1445/CH1/EX1.54/Ex1_54.sce
index f480cc116..78a174178 100644
--- a/1445/CH1/EX1.54/Ex1_54.sce
+++ b/1445/CH1/EX1.54/Ex1_54.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 54
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 54");
@@ -24,6 +25,6 @@ I=vab2/(req+r2);
RTh=(6/5)+(3/4);
req2=10+2;
I3=9/12;
-disp(sprintf("The value of the current is %.2f A",I3));
+disp(sprintf("The value of the current is %f A",I3));
//END
diff --git a/1445/CH1/EX1.55/Ex1_55.sce b/1445/CH1/EX1.55/Ex1_55.sce
index 5c76ec6ec..48f0ff05f 100644
--- a/1445/CH1/EX1.55/Ex1_55.sce
+++ b/1445/CH1/EX1.55/Ex1_55.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 55
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 55");
@@ -16,7 +17,7 @@ r4=10; //in Ohms
res=(vcd/r2)-(v/r3); //'res' (short for result) is used to make calculations easy
vp=res/((1/r2)+(1/r3)+(1/r4));
vba=vp+v;
-disp(sprintf("The voltage between A and B is %.2f V",vba));
+disp(sprintf("The voltage between A and B is %f V",vba));
//END
diff --git a/1445/CH1/EX1.56/Ex1_56.sce b/1445/CH1/EX1.56/Ex1_56.sce
index 83663522a..4513ba7e5 100644
--- a/1445/CH1/EX1.56/Ex1_56.sce
+++ b/1445/CH1/EX1.56/Ex1_56.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 56
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 56");
@@ -15,7 +16,7 @@ req=(r1*r2)+(r2*r3)+(r3*r1); //'req' is the equivalent resistance that appea
ra=req/r3;
rb=req/r1;
rc=req/r2;
-disp(sprintf("The equivalent delta values are ra=( %.2f x r) Ω, rb=( %.2f x r) Ω and rc=( %.2f x r) Ω",ra,rb,rc));
+disp(sprintf("The equivalent delta values are ra=( %f x r) Ω, rb=( %f x r) Ω and rc=( %f x r) Ω",ra,rb,rc));
//END
diff --git a/1445/CH1/EX1.57/Ex1_57.sce b/1445/CH1/EX1.57/Ex1_57.sce
index 7c117b894..7c81c7f70 100644
--- a/1445/CH1/EX1.57/Ex1_57.sce
+++ b/1445/CH1/EX1.57/Ex1_57.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 57
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 57");
@@ -25,9 +26,9 @@ I2=v2/r3;
I_tot=I1+I2;
if(I_tot>0)
-disp(sprintf("The value of I is %.2f A (upward)",I_tot));
+disp(sprintf("The value of I is %f A (upward)",I_tot));
else
-disp(sprintf("The value of I is %.2f A (downward)",-I_tot));
+disp(sprintf("The value of I is %f A (downward)",-I_tot));
//END
diff --git a/1445/CH1/EX1.58/Ex1_58.sce b/1445/CH1/EX1.58/Ex1_58.sce
index f077490a3..142c18d9f 100644
--- a/1445/CH1/EX1.58/Ex1_58.sce
+++ b/1445/CH1/EX1.58/Ex1_58.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 58
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 58");
diff --git a/1445/CH1/EX1.59/Ex1_59.sce b/1445/CH1/EX1.59/Ex1_59.sce
index 39e9ba594..3ae593b55 100644
--- a/1445/CH1/EX1.59/Ex1_59.sce
+++ b/1445/CH1/EX1.59/Ex1_59.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 59
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 59");
diff --git a/1445/CH1/EX1.6/Ex1_6.sce b/1445/CH1/EX1.6/Ex1_6.sce
index f5e6536c4..7c44cc4de 100644
--- a/1445/CH1/EX1.6/Ex1_6.sce
+++ b/1445/CH1/EX1.6/Ex1_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 6
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 6");
diff --git a/1445/CH1/EX1.7/Ex1_7.sce b/1445/CH1/EX1.7/Ex1_7.sce
index 0d1f19f9b..39a1f6b3b 100644
--- a/1445/CH1/EX1.7/Ex1_7.sce
+++ b/1445/CH1/EX1.7/Ex1_7.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 7
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 7");
@@ -29,11 +30,11 @@ req=req1+req2;
v=v2+v3;
I=v/req;
disp("VOLTAGE EQUIVALENT CIRCUIT:");
-disp(sprintf(" Voltage source= %.2f V",v));
-disp(sprintf(" Equivalent resistance(in series)= %.2f Ω",req));
+disp(sprintf(" Voltage source= %f V",v));
+disp(sprintf(" Equivalent resistance(in series)= %f Ω",req));
disp("CURRENT EQUIVALENT CIRCUIT:");
-disp(sprintf(" Current source= %.2f A",I));
-disp(sprintf(" Equivalent resistance(in parallel)= %.2f Ω",req));
+disp(sprintf(" Current source= %f A",I));
+disp(sprintf(" Equivalent resistance(in parallel)= %f Ω",req));
//END
diff --git a/1445/CH1/EX1.8/Ex1_8.sce b/1445/CH1/EX1.8/Ex1_8.sce
index 5f83da65a..ff5151f01 100644
--- a/1445/CH1/EX1.8/Ex1_8.sce
+++ b/1445/CH1/EX1.8/Ex1_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 8
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 8");
@@ -21,6 +22,6 @@ A=[5/2 -1;-1 7/2];
b=[2;2];
x=inv(A)*b;
x=x(2,:);
-disp(sprintf("The current in 2Ω resistor is %.2f A",x));
+disp(sprintf("The current in 2Ω resistor is %f A",x));
//END
diff --git a/1445/CH1/EX1.9/Ex1_9.sce b/1445/CH1/EX1.9/Ex1_9.sce
index 8e91926d2..10958957b 100644
--- a/1445/CH1/EX1.9/Ex1_9.sce
+++ b/1445/CH1/EX1.9/Ex1_9.sce
@@ -1,6 +1,7 @@
//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
//Example 9
+clc;
disp("CHAPTER 1");
disp("EXAMPLE 9");
@@ -26,7 +27,7 @@ req1=r1+r4;
req2=rb+r2;
req3=(req1*req2)/(req1+req2);
req4=ra+req3;
-disp(sprintf("The equivalent input resistance is %.2f Ω",req4));
+disp(sprintf("The equivalent input resistance is %f Ω",req4));
//END
diff --git a/1445/CH10/EX10.10/Ex10_10.sce b/1445/CH10/EX10.10/Ex10_10.sce
index ce3fc1915..ceb1ab464 100644
--- a/1445/CH10/EX10.10/Ex10_10.sce
+++ b/1445/CH10/EX10.10/Ex10_10.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 10
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 10");
@@ -20,7 +21,7 @@ p_g=p-(cu_loss+cr_loss); //rotor input
p_m=p_g*(1-s); //output mechanical power
p_sh=p_m-me_loss; //shaft power
eff=p_sh/p;
-disp(sprintf("The motor efficiency is %.2f %%",eff*100));
+disp(sprintf("The motor efficiency is %f %%",eff*100));
//END
diff --git a/1445/CH10/EX10.11/Ex10_11.sce b/1445/CH10/EX10.11/Ex10_11.sce
index 143337fe8..70e926ccb 100644
--- a/1445/CH10/EX10.11/Ex10_11.sce
+++ b/1445/CH10/EX10.11/Ex10_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 11
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 11");
@@ -18,7 +19,7 @@ N_r=round(N_r); //to round off the value
disp(sprintf("(a) The speed of the motor is %d rpm",N_r));
//solution (b)
-P2=6; // number of poles
+P2=6;
N_s=(120*f)/P2; //synchronous speed of generator in rpm with six poles
disp(sprintf("(b) The speed of the generator is %d rpm",N_s));
diff --git a/1445/CH10/EX10.12/Ex10_12.sce b/1445/CH10/EX10.12/Ex10_12.sce
index 8ea258656..f9e2b16d1 100644
--- a/1445/CH10/EX10.12/Ex10_12.sce
+++ b/1445/CH10/EX10.12/Ex10_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 12
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 12");
@@ -15,18 +16,18 @@ pow_fact=0.8; //full load power factor
//solution (a)
I_fl1=I/5; //starting current at rated voltage is 5 times the rated full-load current
p1=sqrt(3)*v*I_fl1*pow_fact*eff;
-disp(sprintf("(a) The maximum permissible kW rating when the motor when it starts at full voltage is %.3f kW",p1/1000));
+disp(sprintf("(a) The maximum permissible kW rating when the motor when it starts at full voltage is %f kW",p1/1000));
//solution (b)
x=0.8; //voltage is stepped down to 80%
I_fl2=I/((x^2)*5);
p2=sqrt(3)*v*I_fl2*pow_fact*eff;
-disp(sprintf("(b) The maximum permissible kW rating when the motor is used with an auto-transformer is %.3f kW",p2/1000));
+disp(sprintf("(b) The maximum permissible kW rating when the motor is used with an auto-transformer is %f kW",p2/1000));
//solution (c)
I_fl3=I/((0.578^2)*5); //since a star-delta is equivalent to an auto-transformer starter with 57.8% tapping
p3=sqrt(3)*v*I_fl3*pow_fact*eff;
-disp(sprintf("(c) The maximum permissible kW rating when the motor is used with star-delta starter is %.3f kW",p3/1000));
+disp(sprintf("(c) The maximum permissible kW rating when the motor is used with star-delta starter is %f kW",p3/1000));
//The answers are slightly different due to precision of floating point numbers
diff --git a/1445/CH10/EX10.13/Ex10_13.sce b/1445/CH10/EX10.13/Ex10_13.sce
index bdac5ae63..188282fe6 100644
--- a/1445/CH10/EX10.13/Ex10_13.sce
+++ b/1445/CH10/EX10.13/Ex10_13.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 13
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 13");
@@ -40,21 +41,21 @@ end;
//solution (b)
s=(N_s1-N_r)/N_s1;
f_r=s*f;
-disp(sprintf("(b) The slip is %.2f %% and rotor frequency is %d Hz",s*100,f_r));
+disp(sprintf("(b) The slip is %f %% and rotor frequency is %d Hz",s*100,f_r));
//solution (c)
w1=(2*%pi*N_s1)/60;
-disp(sprintf("(c(i)) The speed of stator field w.r.t. stator structure is %.3f rad/s",w1)); //Answer given in the book is wrong
+disp(sprintf("(c(i)) The speed of stator field w.r.t. stator structure is %f rad/s",w1)); //Answer given in the book is wrong
N_s2=N_s1-N_r;
w2=(2*%pi*N_s2)/60;
-disp(sprintf("(c(ii)) The speed of stator field w.r.t. rotor structure is %.3f rad/s",w2));
+disp(sprintf("(c(ii)) The speed of stator field w.r.t. rotor structure is %f rad/s",w2));
//solution (d)
factor=(2*%pi)/60; //converting rpm to radian/second
N_r1=(120*f_r)/P;
-disp(sprintf("(d(i)) The speed of rotor field w.r.t. rotor structure is %.3f rad/s",N_r1*factor));
+disp(sprintf("(d(i)) The speed of rotor field w.r.t. rotor structure is %f rad/s",N_r1*factor));
N_r2=N_r+N_r1;
-disp(sprintf("(d(ii)) The speed of rotor field w.r.t. stator structure is %.3f rad/s",N_r2*factor));
+disp(sprintf("(d(ii)) The speed of rotor field w.r.t. stator structure is %f rad/s",N_r2*factor));
N_r3=N_s1-N_r2;
disp(sprintf("(d(iii)) The speed of rotor field w.r.t. stator structure is %d rad/s",N_r3));
diff --git a/1445/CH10/EX10.14/Ex10_14.sce b/1445/CH10/EX10.14/Ex10_14.sce
index 374233cc2..3bed8ce66 100644
--- a/1445/CH10/EX10.14/Ex10_14.sce
+++ b/1445/CH10/EX10.14/Ex10_14.sce
@@ -1,6 +1,8 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 14
+clc;
+clear
disp("CHAPTER 10");
disp("EXAMPLE 14");
@@ -19,34 +21,34 @@ loss=420; //friction and winding loss in Watts
I1=I_nl/sqrt(3); //phase current=(line current)/sqrt(3) for delta connection
i_sq_r1=(I1^2)*r*3; //stator ((I^2)*R) loss at no load; since resistance is given in per phase, 3 needs to be multiplied for 3-phase
s_loss=(p_ni-loss)-(i_sq_r1);
-disp(sprintf("(a) The stator core loss is %.1f W",s_loss));
+disp(sprintf("(a) The stator core loss is %f W",s_loss));
//solution (b)
I2=I_fl/sqrt(3);
i_sq_r2=(I2^2)*r*3;
p_g=p_fi-s_loss-i_sq_r2; //air-gap power at full load
r_loss=p_g-p;
-disp(sprintf("(b) The total rotor loss at full load is %.0f W",r_loss));
+disp(sprintf("(b) The total rotor loss at full load is %f W",r_loss));
//solution (c)
o_loss=r_loss-loss;
-disp(sprintf("(c) The total rotor ohmic loss at full load is %.0f W",o_loss));
+disp(sprintf("(c) The total rotor ohmic loss at full load is %f W",o_loss));
//solution (d)
s_fl=o_loss/p_g; //full load slip
N_s=1500;
N_r=N_s*(1-s_fl);
-disp(sprintf("(d) The full load speed is %.1f rpm",N_r));
+disp(sprintf("(d) The full load speed is %f rpm",N_r));
//solution (e)
w=(2*%pi*N_s)/60;
T_e=p_g/w;
-disp(sprintf("(e) The internal torque is %.2f N-m",T_e));
-T_sh=p/(w*(1-s));
-disp(sprintf(" The shaft torque is %.2f N-m",T_sh));
+disp(sprintf("(e) The internal torque is %f N-m",T_e));
+T_sh=p/(w*(1-s_fl));
+disp(sprintf(" The shaft torque is %f N-m",T_sh));
eff=p/p_fi;
-disp(sprintf(" The motor efficiency is %.2f %%",eff*100));
+disp(sprintf(" The motor efficiency is %f %%",eff*100));
//The answers may be slightly different due to precision of floating point numbers
-//END
+//END \ No newline at end of file
diff --git a/1445/CH10/EX10.15/Ex10_15.sce b/1445/CH10/EX10.15/Ex10_15.sce
index 71d762cc7..a4fe2370a 100644
--- a/1445/CH10/EX10.15/Ex10_15.sce
+++ b/1445/CH10/EX10.15/Ex10_15.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 15
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 15");
@@ -27,9 +28,6 @@ ratio=s1/s2; //all other parameters in the expressions of th
disp(sprintf("(b) The ratio of the two voltages at the two speeds is %d",ratio));
//solution (c)
-//for rotor speed N_r=900 rpm clockwise, the stator field is running at 600 rpm clockwise. The phase sequence be abc
-//for rotor speed N_r=2100 rpm clockwise, the stator field is running at 600 rpm anticlockwise. The phase sequence be acb
-//Therefore, the phase sequence is reversed.
disp("(c) The poles sequence of -3Φ rotor voltage do not remain the same");
//END
diff --git a/1445/CH10/EX10.16/Ex10_16.sce b/1445/CH10/EX10.16/Ex10_16.sce
index 6328912eb..0ace23044 100644
--- a/1445/CH10/EX10.16/Ex10_16.sce
+++ b/1445/CH10/EX10.16/Ex10_16.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 16
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 16");
@@ -23,9 +24,9 @@ sm2=(-b-sqrt(D))/(2*a);
if(sm1<=0 & sm2<=0) then
disp("The value of the slip at maximum torque (maximum slip) is not valid");
else if(sm1>0 & sm1<1)
-disp(sprintf("The slip at maximum torque (maximum slip) is %.3f",sm1)); //slip is a unitless quantity
+disp(sprintf("The slip at maximum torque (maximum slip) is %f",sm1)); //slip is a unitless quantity
else if(sm2>0 & sm2<1)
-disp(sprintf("The slip at maximum torque (maximum slip) is %.4f",sm2));
+disp(sprintf("The slip at maximum torque (maximum slip) is %f",sm2));
end;
//solution (b) (taking the ratio of T_efl and T_em)
@@ -37,15 +38,15 @@ D=(b)^2-(4*a*c);
ans1=(-b+sqrt(D))/(2*a);
ans2=(-b-sqrt(D))/(2*a);
if(ans1>0 & ans1<1)
-disp(sprintf("The full load slip is %.3f",ans1));
+disp(sprintf("The full load slip is %f",ans1));
sfl=ans1;
else if(ans2>0 & ans2<1)
-disp(sprintf("The full load slip is %.3f",ans2));
+disp(sprintf("The full load slip is %f",ans2));
sfl=ans2;
end;
//solution (c)
I=sqrt(ratio1/sfl);
-disp(sprintf("The rotor current at the starting in terms of full load current is %.3f A",I));
+disp(sprintf("The rotor current at the starting in terms of full load current is %f A",I));
//END
diff --git a/1445/CH10/EX10.2/Ex10_2.sce b/1445/CH10/EX10.2/Ex10_2.sce
index 9d0e9a7d8..996cb1de9 100644
--- a/1445/CH10/EX10.2/Ex10_2.sce
+++ b/1445/CH10/EX10.2/Ex10_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 2
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 2");
@@ -16,7 +17,7 @@ s1=(N_s-N_r1)/N_s; //slip at full load
//solution (a)
N_r2=0; //rotor speed at standstill is zero
s2=(N_s-N_r2)/N_s;
-disp(sprintf("(a) At standstill, the slip is %.2f %%",s2*100));
+disp(sprintf("(a) At standstill, the slip is %f %%",s2*100));
if(s2>1)
disp("Since the slip is greater than 100%, the motor operates as brake");
end;
@@ -32,7 +33,7 @@ end;
//solution (b)
N_r3=500;
s3=(N_s-N_r3)/N_s;
-disp(sprintf("(b) At %d rpm, the slip is %.2f %%",N_r3,s3*100));
+disp(sprintf("(b) At %d rpm, the slip is %f %%",N_r3,s3*100));
if(s3>1)
disp("Since the slip is greater than 100%, the motor operates as brake");
end;
@@ -48,7 +49,7 @@ end;
//solution (c)
N_r4=500;
s4=(N_s+N_r4)/N_s; //as motor runs in opposite direction
-disp(sprintf("(c) At %d rpm, the slip is %.3f %%",N_r4,s4*100));
+disp(sprintf("(c) At %d rpm, the slip is %f %%",N_r4,s4*100));
if(s4>1)
disp("Since the slip is greater than 100%, the motor operates as brake");
end;
@@ -64,7 +65,7 @@ end;
//solution (d)
N_r5=2000;
s5=(N_s-N_r5)/N_s;
-disp(sprintf("(d) At %d rpm, the slip is %.3f %%",N_r5,s5*100));
+disp(sprintf("(d) At %d rpm, the slip is %f %%",N_r5,s5*100));
if(s5>1)
disp("Since the slip is greater than 100%, the motor operates as brake");
end;
diff --git a/1445/CH10/EX10.3/Ex10_3.sce b/1445/CH10/EX10.3/Ex10_3.sce
index 5473f2615..d29fc922d 100644
--- a/1445/CH10/EX10.3/Ex10_3.sce
+++ b/1445/CH10/EX10.3/Ex10_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 3
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 3");
@@ -42,14 +43,14 @@ N_r=round(N_r);
disp(sprintf("(vi) The speed of rotor at 10%% slip is %d rpm",N_r));
s1=(N_s-N_r)/N_s;
fr=s1*f;
-disp(sprintf(" The rotor frequency at this speed is %.0f Hz",fr));
+disp(sprintf(" The rotor frequency at this speed is %f Hz",fr));
//solution (vii)
v=230;
ratio1=1/0.5; //stator to rotor turns ratio
E_rotor=v*(1/ratio1);
E_rotor_dash=ratio*E_rotor;
-disp(sprintf("(vii) The rotor induced emf is %.1f V",E_rotor_dash));
+disp(sprintf("(vii) The rotor induced emf is %f V",E_rotor_dash));
//END
diff --git a/1445/CH10/EX10.4/Ex10_4.sce b/1445/CH10/EX10.4/Ex10_4.sce
index dc5a845d9..32c7b2eba 100644
--- a/1445/CH10/EX10.4/Ex10_4.sce
+++ b/1445/CH10/EX10.4/Ex10_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 4
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 4");
@@ -15,15 +16,15 @@ s_m=r2/X2;
s=1;
ratio1=2/((s/s_m)+(s_m/s)); //ratio of T_starting and T_max
ratio2=2*ratio1; //ratio of T_starting and T_full-load (T_max=2*T_full-load)
-disp(sprintf("(a) If the motor is started by direct-on-line starter, the ratio of starting torque to full load torque is %.3f",ratio2));
+disp(sprintf("(a) If the motor is started by direct-on-line starter, the ratio of starting torque to full load torque is %f",ratio2));
//solution (b)
ratio3=(1/3)*ratio2; //In star-delta starter, T_starting=(1/3)*T_starting_of_DOL
-disp(sprintf("(b) If the motor is started by star-delta starter, the ratio of starting torque to full load torque is %.4f",ratio3));
+disp(sprintf("(b) If the motor is started by star-delta starter, the ratio of starting torque to full load torque is %f",ratio3));
//solution (c)
ratio4=0.7*2*ratio2; //due to 70% tapping
-disp(sprintf("(c) If the motor is started by auto-transformer, the ratio of starting torque to full load torque is %.4f",ratio4));
+disp(sprintf("(c) If the motor is started by auto-transformer, the ratio of starting torque to full load torque is %f",ratio4));
//END
diff --git a/1445/CH10/EX10.5/Ex10_5.sce b/1445/CH10/EX10.5/Ex10_5.sce
index cb2d70200..e1fbc950e 100644
--- a/1445/CH10/EX10.5/Ex10_5.sce
+++ b/1445/CH10/EX10.5/Ex10_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 5
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 5");
diff --git a/1445/CH10/EX10.6/Ex10_6.sce b/1445/CH10/EX10.6/Ex10_6.sce
index fb2412441..d5950b263 100644
--- a/1445/CH10/EX10.6/Ex10_6.sce
+++ b/1445/CH10/EX10.6/Ex10_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 6
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 6");
@@ -20,7 +21,7 @@ disp(sprintf("The speed of the motor is %d rpm",N_r));
E_s=E/sqrt(3); //phase voltage=(line voltage)/sqrt(3) for star connection
E_r=E_s*(1/ratio);
E_r_dash=s*E_r;
-disp(sprintf("The rotor induced emf above 2 Hz is %.3f V per phase",E_r_dash)); //Answer given in the book is wrong
+disp(sprintf("The rotor induced emf above 2 Hz is %f V per phase",E_r_dash)); //Answer given in the book is wrong
//END
diff --git a/1445/CH10/EX10.7/Ex10_7.sce b/1445/CH10/EX10.7/Ex10_7.sce
index 0e53dbb1b..80126f52d 100644
--- a/1445/CH10/EX10.7/Ex10_7.sce
+++ b/1445/CH10/EX10.7/Ex10_7.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 7
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 7");
@@ -17,26 +18,26 @@ N_r=1460; //full load speed in rpm
//solution (i)
N_s=(120*f)/P;
s_fl=(N_s-N_r)/N_s;
-disp(sprintf("(i) The slip at full load is %.2f %%",s_fl*100));
+disp(sprintf("(i) The slip at full load is %f %%",s_fl*100));
s_m=r2/X2;
-disp(sprintf("The slip at which maximum torque occurs is %.0f %%",s_m*100));
+disp(sprintf("The slip at which maximum torque occurs is %f %%",s_m*100));
//solution (ii)
E2=E1/sqrt(3); //phase voltage=(line voltage)/sqrt(3) for star connection
-disp(sprintf("(ii) The emf induced in rotor is %.1f V per phase",E2));
+disp(sprintf("(ii) The emf induced in rotor is %f V per phase",E2));
//solution (iii)
X2_dash=s_fl*X2;
-disp(sprintf("(iii) The rotor reactance per phase is %.4f Ω",X2_dash));
+disp(sprintf("(iii) The rotor reactance per phase is %f Ω",X2_dash));
//solution (iv)
z=sqrt((r2^2)+(X2_dash)^2);
I2=(s_fl*E2)/z;
-disp(sprintf("(iv) The rotor current is %.2f A",I2));
+disp(sprintf("(iv) The rotor current is %f A",I2));
//solution (v)
pow_fact_r=r2/z;
-disp(sprintf("(v) The rotor power factor is %.3f (lagging)",pow_fact_r));
+disp(sprintf("(v) The rotor power factor is %f (lagging)",pow_fact_r));
//END
diff --git a/1445/CH10/EX10.8/Ex10_8.sce b/1445/CH10/EX10.8/Ex10_8.sce
index f324e51a5..f0d05ddf7 100644
--- a/1445/CH10/EX10.8/Ex10_8.sce
+++ b/1445/CH10/EX10.8/Ex10_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 8
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 8");
@@ -32,6 +33,6 @@ disp(sprintf("(d) The mechanical power developed to load is %d kW",p_shaft));
//solution (e)
eff=p_shaft/p_in;
-disp(sprintf("(e) The efficiency of the motor is %.2f %%",eff*100));
+disp(sprintf("(e) The efficiency of the motor is %f %%",eff*100));
//END
diff --git a/1445/CH10/EX10.9/Ex10_9.sce b/1445/CH10/EX10.9/Ex10_9.sce
index 71a074562..9bf730d70 100644
--- a/1445/CH10/EX10.9/Ex10_9.sce
+++ b/1445/CH10/EX10.9/Ex10_9.sce
@@ -1,6 +1,7 @@
//CHAPTER 10- THREE-PHASE INDUCTION MACHINES
//Example 9
+clc;
disp("CHAPTER 10");
disp("EXAMPLE 9");
@@ -25,7 +26,7 @@ I_s=I2/ratio; //stator current
N_s=(120*f)/P;
w=(2*%pi*N_s)/60;
T_s1=(3*E2^2*r2)/(w*z1^2);
-disp(sprintf("(a) The starting current is %.1f A and torque is %.0f N-m",I_s,T_s1));
+disp(sprintf("(a) The starting current is %f A and torque is %f N-m",I_s,T_s1));
//solution (b)
I_s1=30;
@@ -34,7 +35,7 @@ r=sqrt(((E2/I_r)^2)-(X2^2));
r_ext=r-r2;
z2=sqrt((r_ext^2)+(X2^2));
T_s2=(3*E2^2*r)/(w*z2^2);
-disp(sprintf("(b) The external resistance is %.2f Ω and torque is %.2f N-m",r_ext,T_s2));
+disp(sprintf("(b) The external resistance is %f Ω and torque is %f N-m",r_ext,T_s2));
//There answers are different due to precision of floating point numbers
diff --git a/1445/CH11/EX11.1/Ex11_1.sce b/1445/CH11/EX11.1/Ex11_1.sce
index 44d1c756c..89a965f53 100644
--- a/1445/CH11/EX11.1/Ex11_1.sce
+++ b/1445/CH11/EX11.1/Ex11_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 11- SINGLE PHASE INDUCTION MOTOR
//Examle 1
+clc;
disp("CHAPTER 11");
disp("EXAMPLE 1");
@@ -20,7 +21,7 @@ P_m=P_g*(1-S); //mechanical power developed in Watts
P_o=P_m-loss; //output or shaft power in Watts
w=(2*%pi*N_r)/60;
T=P_o/w; //shaft torque in Newton-meters
-disp(sprintf("The shaft torque is %.3f N-m",T));
+disp(sprintf("The shaft torque is %f N-m",T));
//END
diff --git a/1445/CH11/EX11.2/Ex11_2.sce b/1445/CH11/EX11.2/Ex11_2.sce
index ab604d9b1..0992766cb 100644
--- a/1445/CH11/EX11.2/Ex11_2.sce
+++ b/1445/CH11/EX11.2/Ex11_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 11- SINGLE PHASE INDUCTION MOTOR
//Example 2
+clc;
disp("CHAPTER 11");
disp("EXAMPLE 2");
@@ -17,16 +18,16 @@ N_s=(120*f)/P; //synchronous speed in rpm
//solution (a)
disp("Solution (a)");
S_f=(N_s-N_r)/N_s;
-disp(sprintf("The per unit slip in the direction of rotation is %.2f pu",S_f));
+disp(sprintf("The per unit slip in the direction of rotation is %f pu",S_f));
r_f=0.5*(r2/S_f);
-disp(sprintf("The effective forward rotor resistance is %.0f Ω",r_f));
+disp(sprintf("The effective forward rotor resistance is %f Ω",r_f));
//solution (b)
disp("Solution (b)");
S_b=(N_s+N_r)/N_s;
disp(sprintf("The per unit slip in the opposite direction is %f pu",S_b));
r_b=0.5*(r2/S_b);
-disp(sprintf("The effective backward rotor resistance is %.3f Ω",r_b));
+disp(sprintf("The effective backward rotor resistance is %f Ω",r_b));
//END
diff --git a/1445/CH2/EX2.1/Ex2_1.sce b/1445/CH2/EX2.1/Ex2_1.sce
index 5e008ab00..9d1060542 100644
--- a/1445/CH2/EX2.1/Ex2_1.sce
+++ b/1445/CH2/EX2.1/Ex2_1.sce
@@ -1,30 +1,21 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 1
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 1");
-//Find the Form Factor of the half-wave rectified sine wave as shown in Fig 2.20
-//Peak value of voltage is Vm
-//Period is 2pi
-//v=Vm sinwt for 0<wt<pi
-//v=0 for pi<wt<2pi
-
//SOLUTION
-//average value Vav by integrating v over 0 to pi and pi to 2pi and dividing by 2pi
-//assume Vm=1, as value not given
-//The second term of integration not computed as v=0 on the range pi to 2pi
+//average value
v_av=(integrate('sin(x)','x',0,%pi))/(2*%pi);
-//rms value
-//assume Vm=1, as value not given
+//rms value
v_rms=(integrate('sin(x)^2','x',0,%pi))/(2*%pi);
v_rms=sqrt(v_rms);
ff=v_rms/v_av;
-//truncate the answer to 3 digits while displaying:
-disp(sprintf("The form factor is %4.3f",ff));//The answer in the textbook is wrongly shown as 1.572
+disp(sprintf("The form factor is %f",ff));
//END
diff --git a/1445/CH2/EX2.10/Ex2_10.sce b/1445/CH2/EX2.10/Ex2_10.sce
index a4136861e..971167bbd 100644
--- a/1445/CH2/EX2.10/Ex2_10.sce
+++ b/1445/CH2/EX2.10/Ex2_10.sce
@@ -1,14 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 10
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 10");
-//Equations
-//If z1, z2 || then net impedance is Z=z1.z2/(z1+z2)
-//V=IZ
-//Power drawn is = V.I. cos (phi)
-
//VARIABLE INITIALIZATION
v=230; //in Volts
z1=3+(%i*4); //impedance in rectangular form in Ohms
@@ -26,10 +22,7 @@ endfunction;
z=(z1*z2)/(z1+z2);
I=v/z;
angle=-angle1; //as angle1=angle2
-//
-disp(sprintf("The current drawn from the circuit is %2.0f Amp",I));
-disp(sprintf("The net current lags net voltage by %4.2f and ckt is inductive in nature",-angle));
p=v*I*cos(angle*%pi/180); //to convert the angle from degrees to radians
-disp(sprintf("The power drawn from the source is %5.3f kW",p/1000));
+disp(sprintf("The power drawn from the source is %f kW",p/1000));
//END
diff --git a/1445/CH2/EX2.11/Ex2_11.sce b/1445/CH2/EX2.11/Ex2_11.sce
index ba0618572..2ac6e7fd2 100644
--- a/1445/CH2/EX2.11/Ex2_11.sce
+++ b/1445/CH2/EX2.11/Ex2_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 11
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 11");
@@ -8,29 +9,17 @@ disp("EXAMPLE 11");
vdc=100; //DC voltage in Volts
vac=100; //AC voltage in Volts
f=50; //in Hertz
-Idc=10; //dc current in Amperes
-Iac=5; //ac current in Amperes
-
-// coil means a unit of resistence and inductance both
-//Impedence Z=R+jXl
-//when DC supply is connected to coil, it behaves like a short circuit
-//Xl=2.pi.f.L
-//since f=0 in DC, Xl=0 ohms
-//Therefore, R=Vdc/I
-
-//Equation to be used
-//Z^2=R^2+Xl^2
+I1=10; //in Amperes
+I2=5; //in Amperes
//SOLUTION
-r=vdc/Idc; //resistance of the coil in dc circuit
-z=vac/Iac; //impedance of the coil in Ac supply
-xl=sqrt((z^2)-(r^2)); // inductive reactance of coil
-L=xl/(2*%pi*f); //inductance of the coil
-pf=r/z; // power factor pf=R/Z
-//
-disp(sprintf("The inductive reactance of the coil is %5.2f Ohm",xl));
-disp(sprintf("The inductance of the coil is %4.2f H",L));//text book answer is 0.05 H
-disp(sprintf("The power factor of the coil is %3.1f (lagging)",pf));
+r=vdc/I1;
+z=vac/I2;
+xl=sqrt((z^2)-(r^2));
+L=xl/(2*%pi*f);
+pf=r/z;
+disp(sprintf("The inductance of the coil is %f H",L));
+disp(sprintf("The power factor of the coil is %f (lagging)",pf));
//END
diff --git a/1445/CH2/EX2.13/Ex2_13.sce b/1445/CH2/EX2.13/Ex2_13.sce
index 7d6d5143c..fce8566d7 100644
--- a/1445/CH2/EX2.13/Ex2_13.sce
+++ b/1445/CH2/EX2.13/Ex2_13.sce
@@ -1,49 +1,36 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 13
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 13");
-//given
-//load of impedance 1+j.1 ohm connected AC Voltage
-//AC Voltage represented by V=20.sqrt(2).cos(wt+10) volt
-
-//to find
-//current in form of i=Im.sin(wt+phi) A
-// real power
-
-//Equations to be used
-//real Power pr=Vrms.Irms.cos (phi)
-// =(Vm/sqrt(2)).(Im/sqrt(2)).cos(phi)
-// apparent power pa=Vrms.Irms
-// =(Vm/sqrt(2)).(Im/sqrt(2))
-//
//VARIABLE INITIALIZATION
-z1=1+(%i*1); //impedance in rectangular form in Ohms
-v=20*sqrt(2); //amplitude of rms value of voltage in Volts
+z=1+(%i*1); //load impedance in rectangular form in Ohms
+v=20*sqrt(2); //amplitude of rms value of voltage in Volts
//SOLUTION
-function [z,angle]=rect2pol(x,y);
-z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
-angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+function [zp,angle]=rect2pol(x,y); //function 'rect2pol()' converts impedance in rectangular form to polar form
+zp=sqrt((x^2)+(y^2)); //z= (x) + j(y)= (1)+ j(1); 'zp' is in polar form
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
//solution (i)
-[z,angle]=rect2pol(1,1);
+[zp,angle]=rect2pol(1,1); //since x=1 and y=1
v=v/sqrt(2);
-angle_v=100; //v=(20/sqrt(2))*sin(ωt+100)
-I=v/z; //RMS value of current
+angle_v=100; //v=(20/sqrt(2))*sin(ωt+100)
+I=v/zp; //RMS value of current
angle_I=angle_v-angle;
Im=I*sqrt(2);
disp(sprintf("(i) The current in load is i = %d sin(ωt+%d) A",Im,angle_I));
//solution (ii)
-pr=(v/sqrt(2))*(I*sqrt(2))*cos(angle*(%pi/180));
-disp(sprintf("(ii) The real power is %4.0f W",pr));
+p=(v/sqrt(2))*(I*sqrt(2))*cos(angle*(%pi/180));
+disp(sprintf("(ii) The real power is %f W",p));
//solution (iii)
pa=(v/sqrt(2))*(I*sqrt(2));
-disp(sprintf("(ii) The apparent power is %6.2f VAR",pa));
+disp(sprintf("(ii) The apparent power is %f VAR",pa));
//END
diff --git a/1445/CH2/EX2.14/Ex2_14.sce b/1445/CH2/EX2.14/Ex2_14.sce
index 2a46b86fd..c9eeeb76c 100644
--- a/1445/CH2/EX2.14/Ex2_14.sce
+++ b/1445/CH2/EX2.14/Ex2_14.sce
@@ -1,13 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 14
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 14");
-//given
-//EMF e=100.sin(314.t-pi/4) V
-//current i=20.sin (314.t-1.5808) Amp
-
//VARIABLE INITIALIZATION
v=100; //amplitude of rms value of voltage in Volts
I=20; //amplitude of rms value of current in Amperes
@@ -15,42 +12,27 @@ I=20; //amplitude of rms value of current in Amperes
//SOLUTION
//solution(i)
-w=314; //angular frequency in radian/sec, given w.t=314.t
+w=314; //angular frequency in radian/sec
f=w/(2*%pi); //as w=2*(%pi)*f
f=ceil(f);
disp(sprintf("(i) The frequency is %d Hz",f));
//solution (ii)
E=v/sqrt(2);
-angle_E=-45; //in degrees, given in emf equation
+angle_E=-45; //in degrees
I=I/sqrt(2);
-angle_I=-(1.5808*180/%pi); //converting the given angle value in current equation
- // to degrees
- //text book assumes it to be 90 degrees
- // actually the value comes to 90.573168
+angle_I=-90; //in degrees
z=E/I;
angle=angle_E-angle_I;
-disp(sprintf("(ii) The impedance is %d Ω, %d degrees",z,angle));// text book answer is 45 deg
- // the value comes to 45.573168 deg
- // hence shall use floor() to round
-//
-//Equation
-//Z=R+j.Xl
-//Z=Z.cos (phi)+j.Zsin(phi)
+disp(sprintf("(ii) The impedance is %d Ω, %d degrees",z,angle));
function [x,y]=pol2rect(mag,angle1);
x=mag*cos(angle1*(%pi/180)); //to convert the angle from degrees to radian
y=mag*sin(angle1*(%pi/180));
endfunction;
-//round the angle value first using floor
-angle=floor(angle);
-//disp(sprintf(" The angle is %f Degree",angle)); //testing value of angle
[r,x]=pol2rect(z,angle);
L=x/(2*%pi*f);
-//
-disp(sprintf(" The resistance is %f Ohm",r));//text book uses format as 5/sqrt(2)
-disp(sprintf(" The reactance is %f Ohm",x));//text book uses format as 5/sqrt(2)
-disp(sprintf(" The inductance is %6.5f H",L));//text book answer is 0.01126 H
+disp(sprintf(" The inductance is %f H",L));
//END
diff --git a/1445/CH2/EX2.15/Ex2_15.sce b/1445/CH2/EX2.15/Ex2_15.sce
index 4a6ab9086..02d922e8a 100644
--- a/1445/CH2/EX2.15/Ex2_15.sce
+++ b/1445/CH2/EX2.15/Ex2_15.sce
@@ -1,46 +1,43 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 15
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 15");
-//GIVEN
-//choke coil takes current of 2 Amp 60 deg lagging
-//Applied voltage 200 V 50Hz
-
//VARIABLE INITIALIZATION
-I=2; //in Amperes
-angle_I=60; //in degrees
-v1=200; //in Volts
-f=50; //in Hertz
-
-//SOLUTION (i)
-z1=v1/I;
+I=2; //in Amperes
+angle_I=60; //in degrees
+v1=200; //in Volts
+f1=50; //in Hertz
+v2=100; //in Volts
+f2=25; //in Hertz
+
+//SOLUTION
+
+//solution (i): when supply is 200V and frequency is 50 Hz
+z1=v1/I;
+disp(sprintf("(i) When the supply is 200V and frequency is 50 Hz:"));
disp(sprintf("The impedance is %d Ω, %d degrees",z1,angle_I));
-//function to convert from polar form to rectangular form
-function [x,y]=pol2rect(mag,angle);
-x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+function [x,y]=pol2rect(mag,angle); //function 'pol2rect()' converts impedance in polar form to rectangular form
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
y=mag*sin(angle*(%pi/180));
endfunction;
[r,x1]=pol2rect(z1,angle_I);
disp(sprintf("The resistance is %d Ω",r));
-L=x1/(2*%pi*f);
-disp(sprintf("The inductance is %5.3f H",L));
-
-//SOLUTION (ii)
-//Choke is now connected to 100 V 25 hz power supply
-//Howevetr, R and L of the choke will remain the same
-//Reactance will change
-v2=100; // in volts
-f2=25; // in Hz
-x2=2*%pi*f2*L; // inductive reactance in the new system
-z2=sqrt((r^2)+(x2^2)); // impedance in the new system
+L=x1/(2*%pi*f1);
+disp(sprintf("The inductance is %f H",L));
+
+//solution (ii): when supply is 100V and frequency is 25 Hz
+x2=2*%pi*f2*L;
+z2=sqrt((r^2)+(x2^2));
angle=atan(x2/r);
-I1=v2/z2; // current in the new system
-p=v2*I1*cos(-angle); //power consumed
-//
-//disp(sprintf("The angle is %5.4f ",angle));// text book value is assumed 0.75
-disp(sprintf("The power consumed is %5.1f W",p));
+I1=v2/z2;
+p=v2*I1*cos(-angle);
+disp(sprintf("(ii) When supply is 100V and frequency is 25 Hz:"));
+disp(sprintf("The power consumed is %f W",p));
+
+//Answer may be slightly different due to precision of floating point numbers
//END
diff --git a/1445/CH2/EX2.16/Ex2_16.sce b/1445/CH2/EX2.16/Ex2_16.sce
index 1de5edbc7..a838f2925 100644
--- a/1445/CH2/EX2.16/Ex2_16.sce
+++ b/1445/CH2/EX2.16/Ex2_16.sce
@@ -1,16 +1,17 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 16
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 16");
//VARIABLE INITIALIZATION
-r1=5; //in Ohms
-r2=10; //in Ohms
-L1=0.04; //in Henry
-L2=0.05; //in Henry
-v=200; //in Volts
-f=50; //in Hertz
+r1=5; //in Ohms
+r2=10; //in Ohms
+L1=0.04; //in Henry
+L2=0.05; //in Henry
+v=200; //in Volts
+f=50; //in Hertz
//SOLUTION
@@ -19,32 +20,30 @@ xl1=L1*(2*%pi*f);
xl2=L2*(2*%pi*f);
z1=r1+(%i*xl1);
z2=r2+(%i*xl2);
-//function to convert from rectangular form to polar form
-function [z,angle]=rect2pol(x,y);
-z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
-angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+function [z,angle]=rect2pol(x,y); //function 'rect2pol()' converts impedance in rectangular form to polar form
+z=sqrt((x^2)+(y^2)); //z=(x) + j(y) where 'x' represents resistance and 'y' represents inductive reactance
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
[z1,angle1]=rect2pol(r1,xl1);
[z2,angle2]=rect2pol(r2,xl2);
-Y1=1/z1; //admittance
+Y1=1/z1; //admittance
Y2=1/z2;
-//function to convert from polar form to rectangular form
-function [x,y]=pol2rect(mag,angle);
-x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+function [x,y]=pol2rect(mag,angle); //function 'pol2rect()' converts admittance in polar form to rectangular form
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
y=mag*sin(angle*(%pi/180));
endfunction;
[G1,B1]=pol2rect(Y1,angle1);
[G2,B2]=pol2rect(Y2,angle2);
disp("......................................");
disp("SOLUTION (i)");
-disp(sprintf("Conductance of 1st coil is %5.3f S",G1));
-disp(sprintf("Conductance of 2nd coil is %5.3f S",G2));
+disp(sprintf("Conductance of 1st coil is %f S",G1));
+disp(sprintf("Conductance of 2nd coil is %f S",G2));
disp(" ");
-disp(sprintf("Susceptance of 1st coil is %5.3f S",B1));
-disp(sprintf("Susceptance of 2nd coil is %5.3f S",B2));
+disp(sprintf("Susceptance of 1st coil is %f S",B1));
+disp(sprintf("Susceptance of 2nd coil is %f S",B2));
disp(" ");
-disp(sprintf("Admittance of 1st coil is %5.3f S",Y1));
-disp(sprintf("Admittance of 2nd coil is %5.3f S",Y2));
+disp(sprintf("Admittance of 1st coil is %f S",Y1));
+disp(sprintf("Admittance of 2nd coil is %f S",Y2));
disp("......................................");
//solution (ii)
@@ -54,14 +53,14 @@ B=B1+B2;
I=v*Y;
pf=cos((angle)*(%pi/180));
disp("SOLUTION (ii)");
-disp(sprintf("Total current drawn by the circuit is %5.3f A, %.2f degrees",I,-angle));
-disp(sprintf("Power factor of the circuit is %5.3f (lagging)",pf));
+disp(sprintf("Total current drawn by the circuit is %f A, %f degrees",I,-angle));
+disp(sprintf("Power factor of the circuit is %f (lagging)",pf));
disp("......................................");
//solution (iii)
p=v*I*pf;
disp("SOLUTION (iii)");
-disp(sprintf("Power absorbed by the circuit is %5.3f kW",p/1000));// text book answer is 2.256 kW
+disp(sprintf("Power absorbed by the circuit is %f kW",p/1000));
disp("......................................");
//solution (iv)
@@ -73,8 +72,8 @@ endfunction;
[r,x]=pol2rect(z,angle);
L=x/(2*%pi*f);
disp("SOLUTION (iv)");
-disp(sprintf("Resitance of single coil is %5.3f Ω",r));//
-disp(sprintf("Inductance of single coil is %5.3f H",L));//inductance not worked out i the etx book
+disp(sprintf("Resitance of single coil is %f Ω",r));
+disp(sprintf("Inductance of single coil is %f H",L));
disp("......................................");
//END
diff --git a/1445/CH2/EX2.17/Ex2_17.sce b/1445/CH2/EX2.17/Ex2_17.sce
index 9b4c7c29e..614c7b42a 100644
--- a/1445/CH2/EX2.17/Ex2_17.sce
+++ b/1445/CH2/EX2.17/Ex2_17.sce
@@ -1,18 +1,13 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 17
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 17");
-
-//Given
-//AC Voltage e(t)=141.4.sin (120.t)
-//Current in the circuit is
-//i(t)=14.14.sin (120.t+7.07.cos (120.t+30)
-
//VARIABLE INITIALIZATION
-e=141.4; //in Volts
-E=141.4/sqrt(2); //in Volts
+e=141.4; //amplitude of e(t) in Volts
+E=141.4/sqrt(2); //RMS value of e(t) in Volts
angle_E=0; //in degrees
//i(t)=(14.14<0)+(7.07<120)
i1=14.14; //in Amperes
@@ -21,16 +16,16 @@ i2=7.07; //in Amperes
angle_i2=120; //in degrees
//SOLUTION
-//function to convert from polar form to rectangular form
-function [x,y]=pol2rect(mag,angle);
+function [x,y]=pol2rect(mag,angle); //function 'pol2rect()' converts current in polar form to rectangular form
x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
y=mag*sin(angle*(%pi/180));
endfunction;
-[i1_x,i1_y]=pol2rect(i1,angle_i1);
-[i2_x,i2_y]=pol2rect(i2,angle_i2);
+//the given current i(t) is composed of two currents i1(t) and i2(t)
+//i1(t) and i2(t) are not mentioned in the book but are considered for the sake of convenience
+[i1_x,i1_y]=pol2rect(i1,angle_i1); //i1(t)= 14.14 sin(120t)
+[i2_x,i2_y]=pol2rect(i2,angle_i2); //i2(t)=7.07 cos(120t+30)
i=(i1_x+i2_x)+(%i*(i1_y+i2_y));
-//function to convert from rectangular form to polar form
-function [mag,angle]=rect2pol(x,y);
+function [mag,angle]=rect2pol(x,y); //function 'rect2pol()' converts current in rectangular form to polar form
mag=sqrt((x^2)+(y^2));
angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
@@ -43,15 +38,15 @@ angle_z=angle_E-angle_I;
[r,xc]=pol2rect(z,angle_z);
f=50;
c=1/(2*%pi*f*(-xc));
-disp(sprintf("(i) The value of resistance is %5.3f Ω",r));
-disp(sprintf(" The value of capacitance is %6.4f μF",c*10^6));
+disp(sprintf("(i) The value of resistance is %f Ω",r));
+disp(sprintf(" The value of capacitance is %f μF",c*10^6));
//solution (ii)
pf=cos(angle_z*(%pi/180));
-disp(sprintf("(ii) The power factor is %4.3f ",pf));
+disp(sprintf("(ii) The power factor is %f ",pf));
//solution (iii)
p=E*I*pf;
-disp(sprintf("(iii) The power absorbed by the source is %d W",p));
+disp(sprintf("(iii) The power absorbed by the source is %f W",p));
//END
diff --git a/1445/CH2/EX2.18/Ex2_18.sce b/1445/CH2/EX2.18/Ex2_18.sce
index 3f09f083a..b29c61a43 100644
--- a/1445/CH2/EX2.18/Ex2_18.sce
+++ b/1445/CH2/EX2.18/Ex2_18.sce
@@ -1,15 +1,16 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 18
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 18");
//VARIABLE INITIALIZATION
-r=10; //in Ohms
-v=200; //in Volts
-f=50; //in Hertz
-I=10; //in Amperes
-rc=2; //resistance of coil in Ohms
+r=10; //in Ohms
+v=200; //in Volts
+f=50; //in Hertz
+I=10; //in Amperes
+rc=2; //resistance of coil in Ohms
//SOLUTION
@@ -17,21 +18,19 @@ rc=2; //resistance of coil in Ohms
z=v/I;
xl=sqrt((z^2)-((r+rc)^2));
L=xl/(2*%pi*f);
-//disp(sprintf("(i) The Xl of the coil is %3.1f ",xl));
-disp(sprintf("(i) The inductance of the coil is %3.1f H",L*1000));//converting to milli henry
+disp(sprintf("(i) The inductance of the coil is %f H",L));
//solution (ii)
pf=(r+rc)/z;
-disp(sprintf("(ii) The power factor is %3.1f",pf));
+disp(sprintf("(ii) The power factor is %f",pf));
//solution (iii)
vl=I*(rc+(%i*xl));
-//function to convert from rectangular form to polar form
-function [mag,angle]=rect2pol(x,y);
+function [mag,angle]=rect2pol(x,y);//function 'rect2pol()' converts voltage in rectangular form to polar form
mag=sqrt((x^2)+(y^2));
angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
[vl,angle_vl]=rect2pol(real(vl),imag(vl));
-disp(sprintf("(iii) The voltage across the coil is %7.3f V, %5.2f degrees",vl,angle_vl));
+disp(sprintf("(iii) The voltage across the coil is %f V, %f degrees",vl,angle_vl));
//END
diff --git a/1445/CH2/EX2.19/Ex2_19.sce b/1445/CH2/EX2.19/Ex2_19.sce
index 32395bf13..015f1ab16 100644
--- a/1445/CH2/EX2.19/Ex2_19.sce
+++ b/1445/CH2/EX2.19/Ex2_19.sce
@@ -1,50 +1,51 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 19
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 19");
//VARIABLE INITIALIZATION
-z1=4+(%i*3); //impedance in rectangular form in Ohms
-z2=6-(%i*8); //impedance in rectangular form in Ohms
-z3=1.6+(%i*7.2); //impedance in rectangular form in Ohms
-v=100 //in volts
+z1=4+(%i*3); //impedance in rectangular form in Ohms
+z2=6-(%i*8); //impedance in rectangular form in Ohms
+z3=1.6+(%i*7.2); //impedance in rectangular form in Ohms
+v=100 //in volts
//SOLUTION
-//solution (i)
-//Admittance of each parallel branch Y1 and Y2
+//SOLUTION (i)
+
+//Y1 and Y2 are admittances of each parallel branch
Y1=1/z1;
Y2=1/z2;
disp("SOLUTION (i)");
-disp(sprintf("Admittance parallel branch 1 is %3.3f %3.3fj S", real(Y1), imag(Y1)));
-disp(sprintf("Admittance parallel branch 2 is %3.3f+%3.3fj S", real(Y2), imag(Y2)));
+disp(sprintf("Admittance parallel branch 1 is %3f %3fj S", real(Y1), imag(Y1)));
+disp(sprintf("Admittance parallel branch 2 is %3f+%3fj S", real(Y2), imag(Y2)));
disp(" ");
-//solution (ii)
-//Total circuit impedance Z=(Z1||Z2)+Z3
-z=z3+(z2*z1)/(z1+z2)
+//SOLUTION (ii)
+
+z=z3+(z2*z1)/(z1+z2) //series and parallel combination of impedances
disp("SOLUTION (ii)");
-disp(sprintf("Total circuit impedance is %3.3f %3.3fj S", real(z), imag(z)));
-//solution in the book is wrong as there is a total mistake in imaginery part 7.2+0.798=11.598
-//
-//solution (iii)
-//Supply current I=V/Z
-i=v/z;
-function [z,angle]=rect2pol(x,y);
-z0=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
-angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+disp(sprintf("Total circuit impedance is %3f %3fj S", real(z), imag(z)));
+//solution given in the book is wrong as j(7.2+0.798) cannot be equal to j11.598
+
+//SOLUTION (iii)
+
+I=v/z;
+function [Z,angle]=rect2pol(x,y); //function 'rect2pol()' converts impedance in rectangular form to polar form
+Z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
-[z, angle]=rect2pol(real(i), imag(i));
+[Z, angle]=rect2pol(real(I), imag(I));
//disp(sprintf("%f, %f",z,angle));
-//disp(sprintf("%f, %f",real(i), imag(i)));
+//disp(sprintf("%f, %f",real(I), imag(I)));
pf=cos(angle*%pi/180);
-
disp("SOLUTION (iii)");
-disp(sprintf("The power factor is %4.2f",pf));
-//solution (iv)
-//Power supplied by source = VI cosΦ or I^2 . R
-P=v*real(i)*pf;
+disp(sprintf("The power factor is %f",pf));
+
+//SOLUTION (iv)
+P=v*real(I)*pf; //power supplied by source is either (VI cosΦ) or (I^2 . R)
disp("SOLUTION (iv)");
-disp(sprintf("The power supplied by source is %d watt",P));
-//END
+disp(sprintf("The power supplied by source is %f watt",P));
+//END \ No newline at end of file
diff --git a/1445/CH2/EX2.20/Ex2_20.sce b/1445/CH2/EX2.20/Ex2_20.sce
index 77d5ad76a..74c8f035b 100644
--- a/1445/CH2/EX2.20/Ex2_20.sce
+++ b/1445/CH2/EX2.20/Ex2_20.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 20 // read it as example 19 in the book on page 2.72
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 20");
@@ -14,26 +15,26 @@ R=25 //in ohms
//Resonance frequency f = (1/2π)sqrt((1/LC)-R^2/L^2)
fr=(1/(2*%pi))*sqrt((1/(L*C*10^-6))-(R^2)/(L^2));
disp("SOLUTION (i)");
-disp(sprintf("For parallel circuit,Resonant frquency is %3.2f Hz", fr));
+disp(sprintf("For parallel circuit,Resonant frquency is %3f Hz", fr));
disp(" ");
//solution (ii)
//Total circuit impedance at resonance is Z=L/RC
z=L/(R*C*10^-6);
disp("SOLUTION (ii)");
-disp(sprintf("Total impedence at resonance is %3.0f kΩ", z/1000));
+disp(sprintf("Total impedence at resonance is %3f kΩ", z/1000));
//
//solution (iii)
//Bandwidth (f2-f1)=R/(2.π.L)
bw=R/(2*%pi*L);
disp("SOLUTION (iii)");
-disp(sprintf("Bandwidth is %3.2f Hz", bw));
+disp(sprintf("Bandwidth is %3f Hz", bw));
//
//solution (iv)
//Quality factor Q=1/R.sqrt(L/C)
Q=(1/R)*sqrt(L/(C*10^-6));
disp("SOLUTION (iv)");
-disp(sprintf("Quality Factor is %3.2f", Q));
+disp(sprintf("Quality Factor is %3f", Q));
//solution in the book is wrong as there is a total mistake in imaginery part 7.2+0.798=11.598
//
//END
diff --git a/1445/CH2/EX2.22/Ex2_22.sce b/1445/CH2/EX2.22/Ex2_22.sce
index 5a3d218e3..992d68318 100644
--- a/1445/CH2/EX2.22/Ex2_22.sce
+++ b/1445/CH2/EX2.22/Ex2_22.sce
@@ -1,39 +1,33 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
-//Example 22 // read it as example 21 in the book on page 2.75
+//Example 22 (mentioned as 'example 21' in the book)
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 22");
//VARIABLE INITIALIZATION
L=0.1 //in Henry
-C=8 //in mf, multiply by 10^-6 to convert to f
-R=10 //in ohms
+C=8*10^-6 //in Farad
+R=10 //in Ohms
//SOLUTION
//solution (i)
-//Resonance frequency for a series RLC circuitf = 1/2.π.sqrt(LC)
-fr=1/(2*%pi*sqrt(L*C*10^-6));
+fr=1/(2*%pi*sqrt(L*C)); //resonant frequency
disp("SOLUTION (i)");
-disp(sprintf("For series circuit,Resonant frquency is %3.2f Hz", fr));
+disp(sprintf("For series circuit, resonant frquency is %3f Hz", fr));
disp(" ");
//solution (ii)
-//Q-factor is Q=w.L/R= 2.π,fr.L/R
w=2*%pi*fr;
Q=w*L/R;
disp("SOLUTION (ii)");
-disp(sprintf("The Q-factor at resonance is %3.2f kΩ", Q));
-//
+disp(sprintf("The Q-factor at resonance is %3f kΩ", Q));
+
//solution (iii)
-//Bandwidth, BW, (f2-f1)=R/(2.π.L), where f1,f2 half power frequencies
-//f1=fr-BW/2
-//f2=fr+BW/2
bw=R/(2*%pi*L);
-f1=fr-bw/2;
-f2=fr+bw/2;
+f1=fr+bw/2;
disp("SOLUTION (iii)");
-disp(sprintf("half frequency 1 is %3.2f Hz", f1));
-disp(sprintf("half frequency 2 is %3.2f Hz", f2));//
-//
+disp(sprintf("Half power frequencies are %3f Hz and %3f Hz", f1,fr));
+
//END
diff --git a/1445/CH2/EX2.23/Ex2_23.sce b/1445/CH2/EX2.23/Ex2_23.sce
index 7ff187786..c570e9471 100644
--- a/1445/CH2/EX2.23/Ex2_23.sce
+++ b/1445/CH2/EX2.23/Ex2_23.sce
@@ -1,38 +1,32 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
-//Example 22 // read it as example 22 in the book on page 2.76
+//Example 22 (mentioned as 'example 22' in the book)
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 23");
-//Given
-//Equation of an Ac current with respect to origin
-//i=100.sin2.pi.50t
-//i=100.sin 100.pi.t
-//
//VARIABLE INITIALIZATION
-A=100 //Amplitude in Amps
-f=50 //frquency in Hz
-t1=1/600 //sec after wave becomes zero again
-a1=86.6 //amplitude at some time t after start
+A=100 //amplitude in Amperes
+f=50 //frequency in Hz
+t1=1/600 //time in seconds after wave becomes zero again
+a1=86.6 //amplitude in Amperes at some time 't' after start
+
//SOLUTION
//solution (a)
//Amplitude at 1/600 second after it becomes zero
-//
w=f*2*%pi; //angular speed
hp=1/(2*f); //half period, the point where sine beomes zero again after origin
-//The hald period , hp, needs to be added to 1/600 sec
t=hp+t1;
a2=A*sin(w*t);
disp("SOLUTION (a)");
-disp(sprintf("Amplitude after 1/600 sec is %3.0f A", a2));
+disp(sprintf("Amplitude after 1/600 sec is %3f A", a2));
disp(" ");
//solution (b)
//since A=A0.sinwt, t=asin(A/A0)/w
t2=(asin(a1/A))/w;
disp("SOLUTION (b)");
-disp(sprintf("The time at which amp would be %3.2f is %3.3f sec", a1,t2));//text book answer is 1/300 sec
-//
+disp(sprintf("The time at which amp would be %f is %3f sec", a1,t2));
//END
diff --git a/1445/CH2/EX2.24/Ex2_24.sce b/1445/CH2/EX2.24/Ex2_24.sce
index ceb0d8ce0..7d2c67727 100644
--- a/1445/CH2/EX2.24/Ex2_24.sce
+++ b/1445/CH2/EX2.24/Ex2_24.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 22 // read it as example 23 in the book on page 2.77
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 24");
@@ -17,11 +18,11 @@ rms=Im/2;
Iav=Im/%pi; //average current
ff=rms/Iav;
disp("SOLUTION");
-disp(sprintf("RMS value of current is %3.0f A", rms));
-disp(sprintf("Average value of current is %3.2f A", Iav));
-disp(sprintf("Form Factor of current is %3.2f A", ff));
+disp(sprintf("RMS value of current is %3f A", rms));
+disp(sprintf("Average value of current is %3f A", Iav));
+disp(sprintf("Form Factor of current is %3f A", ff));
disp(" ");
-//
+
//END
diff --git a/1445/CH2/EX2.25/Ex2_25.sce b/1445/CH2/EX2.25/Ex2_25.sce
index 9ac4777b9..0d45038ac 100644
--- a/1445/CH2/EX2.25/Ex2_25.sce
+++ b/1445/CH2/EX2.25/Ex2_25.sce
@@ -1,23 +1,23 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 25 // read it as example 24 in the book on page 2.78
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 25");
//VARIABLE INITIALIZATION
V=350 //Amplitude in Volts
-f=50 //frquency in Hz
+f=50 //frequency in Hz
t1=0.005 //sec after wave becomes zero again
-t2=0.008 //sec after waves passes tgrough 0 in -ve direction
+t2=0.008 //sec after waves passes through 0 in -ve direction
//SOLUTION
-//e=E.sin(wt)
-
+//e=Esinwt
//solution (a)
-//
+//RAmplitude at 1/600 second after it becomes zero
w=f*2*%pi; //angular speed
v1=V*sin(w*t1);
disp("SOLUTION (a)");
-disp(sprintf("Voltage after %.3f sec is %3d V", t1,v1));
+disp(sprintf("Voltage after %f sec is %3f A", t1,v1));
disp(" ");
//solution (b)
//since wave will pass in -ve direction after half period
@@ -25,7 +25,7 @@ hp=1/(2*f); //half period, the point where sine beomes zero
t=hp+t2;
v2=V*sin(w*t);
disp("SOLUTION (b)");
-disp(sprintf("The voltage would be %5.2f V in %.3f sec", v2,t));
+disp(sprintf("The voltage would be %f V %3f sec", v2,t));
//
//END
diff --git a/1445/CH2/EX2.26/Ex2_26.sce b/1445/CH2/EX2.26/Ex2_26.sce
index 05ce350d7..99705bbcd 100644
--- a/1445/CH2/EX2.26/Ex2_26.sce
+++ b/1445/CH2/EX2.26/Ex2_26.sce
@@ -1,29 +1,30 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 26 // read it as example 25 in the book on page 2.79
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 26");
//VARIABLE INITIALIZATION
A=100 //Amplitude in Amps
f=25 //frquency in Hz
-a1=20 //value of current in Amps to be achieved in certain time
-a2=100 //value of current in Amps tobe achieved in certain time
+a1=20 //svalue in Amps to be achieved in certain time
+a2=100 //in Amps
//SOLUTION
-//i=Im.sin(wt)
+//i=Isinwt
//solution (a)
-//
+//RAmplitude at 1/600 second after it becomes zero
w=f*2*%pi; //angular speed
-//when current attains 20 amp means instantaneous value of i=20 Amp
t1=(asin(a1/A))/w;
disp("SOLUTION (a)");
-disp(sprintf("The time to reach value %d A is %3.5f sec", a1,t1));
+disp(sprintf("The time to reach value %f A is %3f sec", a1,t1));
disp(" ");
-//solution (b)//when current attains 100 amp means instantaneous value of i=100 Amp
+//solution (b)
+//since wave will pass in -ve direction after half period
t2=(asin(a2/A))/w;
disp("SOLUTION (a)");
-disp(sprintf("The time to reach value %d A is %3.2f sec", a2,t2));
+disp(sprintf("The time to reach value %f A is %3f sec", a2,t2));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.27/Ex2_27.sce b/1445/CH2/EX2.27/Ex2_27.sce
index a88d01676..a8113eea2 100644
--- a/1445/CH2/EX2.27/Ex2_27.sce
+++ b/1445/CH2/EX2.27/Ex2_27.sce
@@ -1,15 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 27 // read it as example 26 in the book on page 2.79
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 27");
-// Given
-//Voltage across the circuit
-//v=250.sin (314.t-10)
-//current is given by
-//i=10.sin(314.t+50)
-//
//VARIABLE INITIALIZATION
V=250; //Amplitude in Volts
w=314; //angular spped
@@ -41,13 +36,13 @@ angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
[mag,angle]=rect2pol(real(Z),imag(Z));
disp("SOLUTION (a)");
-disp(sprintf("The impedance is %d < %3d Deg", mag,angle));//text book answer is -60 deg
+disp(sprintf("The impedance is %f < %3f Deg", mag,angle));
//disp(" ");
//power factor=cos(angle)
pf=cos(-1*angle*%pi/180); //convert to radians and change sign
-disp(sprintf("The power factor is %2.1f", pf));
+disp(sprintf("The power factor is %f", pf));
//Z=R-jXc by comparing real and imag paarts we get
-disp(sprintf("The resistance is %3.1fΩ and Reactance is %4.2fΩ", real(Z), imag(Z)));
+disp(sprintf("The resistance is %fΩ and Reactance is %3fΩ", real(Z), imag(Z)));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.28/Ex2_28.sce b/1445/CH2/EX2.28/Ex2_28.sce
index ce41fd503..daea93794 100644
--- a/1445/CH2/EX2.28/Ex2_28.sce
+++ b/1445/CH2/EX2.28/Ex2_28.sce
@@ -1,10 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 28 // read it as example 27 in the book on page 2.80
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 28");
-//
-//Circuit diagram given with 3 branches
+
//VARIABLE INITIALIZATION
z1=2+(%i*3); //impedance in rectangular form in Ohms
z2=1-(%i*5); //impedance in rectangular form in Ohms
@@ -16,51 +16,43 @@ v=10; //in volts
//Total impedance
//Total circuit impedance Z=(Z1||Z2)+Z3
z=z1+(z2*z3)/(z2+z3);
-//define function
+disp("SOLUTION (i)");
+disp(sprintf("Total circuit impedance is %3f %3fj S", real(z), imag(z)));
+//Total supply current I=V/Z
+//solution (b)
+i=v/z;
function [mag,angle]=rect2pol(x,y);
mag=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
-[magZ, angleZ]=rect2pol(real(z),imag(z));
-disp("SOLUTION (i)");
-disp(sprintf("Total circuit impedance is %3.2f+%3.1fj S", real(z), imag(z)));// in rectangula rform
-disp(sprintf("Total circuit impedance is %3.2f %3.1f S", magZ, angleZ)); //in polar form
-
-//solution (b)
-//Total supply current I=V/Z
-i=v/z;
[mag, angle]=rect2pol(real(i), imag(i));
disp("SOLUTION (b)");
-disp(sprintf("Total current is %3.2f <%3.1f Amp",mag,angle));
+disp(sprintf("Total current is %f<%f Amp",mag,angle));
//solution (c)
//Vbc=I.Zbc where Zbc=(z2*z3)/(z2+z3)
Vbc=i*((z2*z3)/(z2+z3));
[mag1, angle1]=rect2pol(real(Vbc), imag(Vbc));
disp("SOLUTION (c)");
-disp(sprintf("The voltage across the || circuit is %3.2f-%3.2fj",real(Vbc), imag(Vbc)));
-disp(sprintf("The voltage across the || circuit is %3.2f <%3.1f",mag1, angle1));
-disp(sprintf("The voltage Vbc lags circuit by %3.2f Deg",angle-angle1));
+disp(sprintf("The voltage across the || circuit is %f<%f",mag1, angle1));
+disp(sprintf("The voltage Vbc lags circuit by %f Deg",angle-angle1));
//solution (d)
//i2=Vbc/z2, i3=Vbc/z3
i2=Vbc/z2;
i3=Vbc/z3;
[mag2, angle2]=rect2pol(real(i2), imag(i2));
[mag3, angle3]=rect2pol(real(i3), imag(i3));
-disp("SOLUTION (d)");
-disp(sprintf("The current across fist branch of || circuit is %3.2f <%3.1f",mag2, angle2));
-disp(sprintf("The current across second branch of || circuit is %3.2f <%3.1f",mag3, angle3));
+disp(sprintf("The current across fist branch of || circuit is %f<%f",mag2, angle2));
+disp(sprintf("The current across second branch of || circuit is %f<%f",mag3, angle3));
//solution (e)
pf=cos(-1*angle*%pi/180);
disp("SOLUTION (e)");
-disp(sprintf("The power factor is %.3f",pf));
+disp(sprintf("The power factor is %f",pf));
//solution (iv)
//Apparent power s=VI, True Power, tp I^2R, Reactive Power, rp=I^2X or VISSin(angle)
-s=v*mag; //apparent power
-tp=(mag^2)*magZ;//true power
-rp=v*mag*sin(-1*angle*%pi/180);//reactive power
+s=v*mag;
+tp=mag*mag*real(z);
+rp=v*mag*sin(-1*angle*%pi/180);
disp("SOLUTION (f)");
-disp(sprintf("The Apparent power is %.2f VA",s));
-disp(sprintf("The True power is %.2f W",tp));//text book answer is 16.32 may be due to truncation
-disp(sprintf("The Reactive power is %.1f vars",rp));
+disp(sprintf("The Apparent power is %f VA, True power is %f W , Reactive power is %f vars",s,tp,rp));
disp(" ");
//END
diff --git a/1445/CH2/EX2.29/Ex2_29.sce b/1445/CH2/EX2.29/Ex2_29.sce
index e09038cf4..0f2920b3b 100644
--- a/1445/CH2/EX2.29/Ex2_29.sce
+++ b/1445/CH2/EX2.29/Ex2_29.sce
@@ -1,10 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 29 // read it as example 28 in the book on page 2.83
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 29");
-//
-//i=120.si(2.pi.f.t)
+
//VARIABLE INITIALIZATION
I=120; //Amplitude in Amps
f=60; //Hz
@@ -16,11 +16,11 @@ i2=96; //in Amps ,2 to find time taken to reach this
w=2*%pi*f;
i=I*sin(w*t1);
disp("SOLUTION (a)");
-disp(sprintf("The amplitude at time %.3f sec is %.1f Amp", t1,i));
+disp(sprintf("The amplitude at time %f sec is %f Amp", t1,i));
//solution (b)
t2=(asin(i2/I))/w;
disp("SOLUTION (b)");
-disp(sprintf("The time taken to reach %2.0f Amp is %.5f Sec", i2,t2));
+disp(sprintf("The time taken to reach %f Amp is %f Sec", i2,t2));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.3/Ex2_3.sce b/1445/CH2/EX2.3/Ex2_3.sce
index a6ea8cb77..cb6e00086 100644
--- a/1445/CH2/EX2.3/Ex2_3.sce
+++ b/1445/CH2/EX2.3/Ex2_3.sce
@@ -1,25 +1,18 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 3
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 3");
-//To find average and rms value rectified sine wave shown in Fig. 2.22
-
//VARIABLE INITIALIZATION
-//Time period T=pi
v_m=5; //peak value of voltage in Volts
-
//SOLUTION
-//average value Vav by integrating v over 0 to pi and dividing by pi
v_av=(integrate('v_m*sin(x)','x',0,%pi))/(%pi);
-//first v squre rms
v_rms=(integrate('(v_m*sin(x))^2','x',0,%pi))/(%pi);
-//then V rms: The previous variable reused
v_rms=sqrt(v_rms);
-//truncating display to 3 digits
-disp(sprintf("Average value of full wave rectifier sine wave is %4.3f V",v_av));// answer is wrongly shown as 3.185 in the book
-//truncating display to 2 digits
-disp(sprintf("Effective value of full wave rectifier sine wave is %4.2f V",v_rms));
+disp(sprintf("Average value of full wave rectifier sine wave is %f V",v_av));
+disp(sprintf("Effective value of full wave rectifier sine wave is %f V",v_rms));
+
//END
diff --git a/1445/CH2/EX2.30/Ex2_30.sce b/1445/CH2/EX2.30/Ex2_30.sce
index 7f36ea719..ebe06388b 100644
--- a/1445/CH2/EX2.30/Ex2_30.sce
+++ b/1445/CH2/EX2.30/Ex2_30.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 30 // read it as example 29 in the book on page 2.83
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 30");
@@ -15,21 +16,21 @@ i3=14.14; //in Amps, to find time when will it occur a
//solution (a)
w=2*%pi*f;
Im=rms*sqrt(2);
-disp(sprintf("The equation would be i=%.2f. sin(%f.t)", Im,w));
+disp(sprintf("The equation would be i=%f. sin(%f.t)", Im,w));
t0=(asin(1)/w); //time to reach maxima in +ve direction
i=Im*sin(w*t1);
disp("SOLUTION (a)");
-disp(sprintf("The amplitude at time %f sec is %.2f Amp", t1,i));
+disp(sprintf("The amplitude at time %f sec is %f Amp", t1,i));
//solution (b)
tx=t0+t2;
i2=Im*sin(w*tx);
disp("SOLUTION (b)");
-disp(sprintf("The amplitude at time %.5f sec is %.2f Amp", t2,i2));
+disp(sprintf("The amplitude at time %f sec is %f Amp", t2,i2));
//solution (c)
ty=(asin(i3/Im))/w;
t3=t0-ty; //since ty is the time starting from 0, the origin needs to be shifted to maxima
disp("SOLUTION (c)");
-disp(sprintf("The amplitude of %.2f Amp would be reached in %.5f Sec", i3,t3));
+disp(sprintf("The amplitude of %f Amp would be reached in %f Sec", i3,t3));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.31/Ex2_31.sce b/1445/CH2/EX2.31/Ex2_31.sce
index 870c20204..a462adcc7 100644
--- a/1445/CH2/EX2.31/Ex2_31.sce
+++ b/1445/CH2/EX2.31/Ex2_31.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 31 // read it as example 30 in the book on page 2.84
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 31");
@@ -11,10 +12,10 @@ disp("EXAMPLE 31");
//say
T=1; // 1 sec
Yav=(1/T)*integrate('(10+10*t/T)', 't', 0, 1);
-disp(sprintf("The average value of waveform is %.0f", Yav));
+disp(sprintf("The average value of waveform is %f", Yav));
//RMS value Yrms=(1/T).Integral(y^2.dt) from 0 to T
Yms=(1/T)*integrate('(10+10*t/T)^2', 't', 0, 1);
-disp(sprintf("The RMS value of waveform is %.2f", sqrt(Yms)));
+disp(sprintf("The RMS value of waveform is %f", sqrt(Yms)));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.32/Ex2_32.sce b/1445/CH2/EX2.32/Ex2_32.sce
index dcbdbaf4a..a48c72871 100644
--- a/1445/CH2/EX2.32/Ex2_32.sce
+++ b/1445/CH2/EX2.32/Ex2_32.sce
@@ -1,16 +1,15 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 32 // read it as example 31 in the book on page 2.85
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 32");
//VARIABLE INITIALIZATION
//function of the waveform is deduced to be i=Im.sinΘ
//SOLUTION
-//Average value of current is Iav=area of rectified wave/interval
-//Can be achieved by integration
//Iav=(1/2.π).Integral(ydΘ) from 0 to π, and π to 2.π is zero, interval is 2.π
-//need to assume values, let Im=1
+//
//say
Im=1; // in Amp
Iav=(1/(2*%pi))*integrate('(Im*sin(th))', 'th', 0, %pi);
@@ -19,7 +18,7 @@ Iav=(1/(2*%pi))*integrate('(Im*sin(th))', 'th', 0, %pi);
Ims=(1/(2*%pi))*integrate('(Im*sin(th))^2', 'th', 0, %pi);
//disp(sprintf("The RMS value of waveform is %f", sqrt(Ims)));
ff=sqrt(Ims)/Iav;
-disp(sprintf("The form factor of waveform is %.2f",ff));
+disp(sprintf("The form factor of waveform is %f",ff));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.33/Ex2_33.sce b/1445/CH2/EX2.33/Ex2_33.sce
index 3897c5fcc..132e1b1b0 100644
--- a/1445/CH2/EX2.33/Ex2_33.sce
+++ b/1445/CH2/EX2.33/Ex2_33.sce
@@ -1,9 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 33 // read it as example 32 in the book on page 2.86
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 33");
-//Three coils of resistance 20,30,40 ohms and inductance 0.5,0.3 and 0.2 H are connected in series
+
//VARIABLE INITIALIZATION
r1=20; //in Ω
r2=30; //
@@ -16,17 +17,17 @@ f=50; //Hz
//coils connected in series
//
//SOLUTION
-R=r1+r2+r3; //Total resistance
-L=l1+l2+l3; //Total inductance
-XL=2*%pi*f*L;//inductive reactance
+R=r1+r2+r3;
+L=l1+l2+l3;
+XL=2*%pi*f*L;
//impedence Z=sqrt(R*2 +XL^2)
Z=sqrt(R^2 +XL^2);
I=V/Z;
pf=R/Z;
pc=V*I*pf;
-disp(sprintf("The total current is %.3f Amp", I));
-disp(sprintf("The Power Factor is %.3f lagging", pf));
-disp(sprintf("The Power consumed in the circuit is %.1f W", pc));
+disp(sprintf("The total current is %f Amp", I));
+disp(sprintf("The Power Factor is %f lagging", pf));
+disp(sprintf("The Power consumed in the circuit is %f W", pc));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.34/Ex2_34.sce b/1445/CH2/EX2.34/Ex2_34.sce
index 560d4657d..aecd5a669 100644
--- a/1445/CH2/EX2.34/Ex2_34.sce
+++ b/1445/CH2/EX2.34/Ex2_34.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 34 // read it as example 33 in the book on page 2.87
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 34");
@@ -11,15 +12,15 @@ V=400; // volts
f=50; //Hz
//
//SOLUTION
-XC=1/(2*%pi*f*c); //capacitative reactance
+XC=1/(2*%pi*f*c);
//impedence Z=sqrt(R^2 +XL^2)
Z=sqrt(r^2 +XC^2);
I=V/Z;
pf=r/Z;
pc=V*I*pf;
-disp(sprintf("The total current is %.2f Amp", I));
-disp(sprintf("The Power Factor is %.3f leading", pf));
-disp(sprintf("The Power consumed in the circuit is %.0f W",pc));
+disp(sprintf("The total current is %f Amp", I));
+disp(sprintf("The Power Factor is %f leading", pf));
+disp(sprintf("The Power consumed in the circuit is %f W",pc));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.35/Ex2_35.sce b/1445/CH2/EX2.35/Ex2_35.sce
index 6d46b1c66..c205d94bf 100644
--- a/1445/CH2/EX2.35/Ex2_35.sce
+++ b/1445/CH2/EX2.35/Ex2_35.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 35 // read it as example 34 in the book on page 2.88
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 35");
@@ -19,27 +20,27 @@ XC=1/(2*%pi*f*C);
X=XL-XC;
Z=sqrt(R^2 +X^2);
disp("SOLUTION (a)");
-disp(sprintf("The total impedence is %d Ω", Z));
+disp(sprintf("The total impedence is %f Ω", Z));
I=V/Z;
disp("SOLUTION (b)");
-disp(sprintf("The total current is %.3f Amp", I));
+disp(sprintf("The total current is %f Amp", I));
Vr=I*R;
Vi=I*XL;
Vc=I*XC;
disp("SOLUTION (c)");
-disp(sprintf("The voltage across resistance is %.1f V",Vr));
-disp(sprintf("The voltage across inductance is %.1f V",Vi));
-disp(sprintf("The voltage across capacitance is %.1f V",Vc));
+disp(sprintf("The voltage across resistance is %f V",Vr));
+disp(sprintf("The voltage across inductance is %f V",Vi));
+disp(sprintf("The voltage across capacitance is %f V",Vc));
pf=R/Z;
pc=V*I*pf;
disp("SOLUTION (d)");
-disp(sprintf("The Power Factor is %.2f leading", pf));
+disp(sprintf("The Power Factor is %f leading", pf));
disp("SOLUTION (e)");
-disp(sprintf("The Power consumed in the circuit is %.0f W",pc));
+disp(sprintf("The Power consumed in the circuit is %f W",pc));
//XL=XC
f0=1/(2*%pi*sqrt(L*C));
disp("SOLUTION (f)");
-disp(sprintf("Resonance will occur at %.1f Hz",f0));//The text book answer is 39.8 which is apprently wrong
+disp(sprintf("Resonance will occur at %f Hz",f0));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.36/Ex2_36.sce b/1445/CH2/EX2.36/Ex2_36.sce
index 7ea401187..3ec7e82b8 100644
--- a/1445/CH2/EX2.36/Ex2_36.sce
+++ b/1445/CH2/EX2.36/Ex2_36.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 36 // read it as example 35 in the book on page 2.90
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 36");
@@ -17,20 +18,20 @@ f=50; //Hz
//conductance g, susceptance b
Z12=(R1^2 +XL^2); //squared impedance Z^2 for branch 1
Z22=(R1^2 +C^2); //squared impedance Z^2 for branch 2
-g1=R1/Z12; //conductance
+g1=R1/Z12;
g2=R2/Z22;
-b1=-XL/Z12; //susceptance
+b1=-XL/Z12;
b2=C/Z22;
-g=g1+g2; //Total conductance
-b=b1+b2; //Total susceptance
-Y=sqrt(g^2+b^2); //Total admittance
+g=g1+g2;
+b=b1+b2;
+Y=sqrt(g^2+b^2);
I=V*Y;
disp("SOLUTION (a)");
-disp(sprintf("The total current is %.1f Amp", I));//text book answer is 12.3 A
+disp(sprintf("The total current is %f Amp", I));
pf=g/Y;
disp("SOLUTION (b)");
-disp(sprintf("The power factor is %.3f", pf)); // text book answer is 0.985
+disp(sprintf("The power factor is %f", pf));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.37/Ex2_37.sce b/1445/CH2/EX2.37/Ex2_37.sce
index 692a599ba..e96f6f0fe 100644
--- a/1445/CH2/EX2.37/Ex2_37.sce
+++ b/1445/CH2/EX2.37/Ex2_37.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 37 // read it as example 36 in the book on page 2.93
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 37");
@@ -20,8 +21,8 @@ Z2=sqrt(R2^2 +C^2); //squared impedance Z^2 for branch 2
i1=V/Z1;
i2=V/Z2;
disp("SOLUTION (a)");
-disp(sprintf("The current in Branch 1 is %d Amp", i1));
-disp(sprintf("The current in Branch 2 is %d Amp", i2));
+disp(sprintf("The current in Branch 1 is %f Amp", i1));
+disp(sprintf("The current in Branch 2 is %f Amp", i2));
phi1=atan(XL/R1);
phi2=%pi/2; //atan(C/R2); //R2=0, output is infinity
Icos=i1*cos(phi1)+i2*cos(phi2); // phi in radians
@@ -29,11 +30,11 @@ Isin=-i1*sin(phi1)+i2*sin(phi2); // phi in radians
I=sqrt(Icos^2+Isin^2);
//
disp("SOLUTION (b)");
-disp(sprintf("The total current is %.2f Amp", I));
+disp(sprintf("The total current is %f Amp", I));
//
-pf=Icos/I; //power factor
+pf=Icos/I;
disp("SOLUTION (c)");
-disp(sprintf("The power factor is %.3f ", pf));
+disp(sprintf("The power factor is %f ", pf));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.38/Ex2_38.sce b/1445/CH2/EX2.38/Ex2_38.sce
index bce55490e..b429b6181 100644
--- a/1445/CH2/EX2.38/Ex2_38.sce
+++ b/1445/CH2/EX2.38/Ex2_38.sce
@@ -1,10 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 38 // read it as example 37 in the book on page 2.93
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 38");
-//
-//Solve exercise 36 by j method
+
//VARIABLE INITIALIZATION
z1=10+15*%i;
z2=12-20*%i;
@@ -15,10 +15,10 @@ magZ=sqrt(real(Z)^2+imag(Z)^2);
I=V/magZ;
pf=real(Z)/magZ;
disp("SOLUTION (a)");
-disp(sprintf("The current is %.1f Amp", I));
+disp(sprintf("The current is %f Amp", I));
//
disp("SOLUTION (b)");
-disp(sprintf("The Power factor is %.3f lagging", pf));
+disp(sprintf("The Power factor is %f", pf));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.39/Ex2_39.sce b/1445/CH2/EX2.39/Ex2_39.sce
index 6fe1c5555..2501085b9 100644
--- a/1445/CH2/EX2.39/Ex2_39.sce
+++ b/1445/CH2/EX2.39/Ex2_39.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 39 // read it as example 38 in the book on page 2.94
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 39");
@@ -12,14 +13,8 @@ V=200;
f=50;
E=V+0*%i; // representing as a vector
//invZ=1/z1+1/z2;
-//Z23=1/Z2+1/Z3 which is equivalent impedance of parallel circuits
-//Z13=Z1+Z23 which is symbolic expression of total impedance
-//
-//SOLUTION
Z23=z2*z3/(z2+z3);
Z=z1+Z23;
-disp("SOLUTION (a)");
-disp(sprintf("The symbolic expression of impedance %.1f+j%.1f Amp",real(Z),imag(Z)));
I=E/Z;
magI=sqrt(real(I)^2+imag(I)^2); //total current
phi=atan(-imag(I)/real(I)); //total phase
@@ -43,21 +38,21 @@ i2=e23/z3;
magi2=sqrt(real(i2)^2+imag(i2)^2);
phii2=atan(imag(i2)/real(i2));
disp("SOLUTION (b)");
-disp(sprintf("The current in Upper branch is %.1f Amp",magi1));
-disp(sprintf("The current in Lower branch is %.1f Amp",magi2));
-disp(sprintf("The Total current is %.2f Amp",magI));//the text book answer is wrongly shown as 328 A
+disp(sprintf("The current in Upper branch is %f Amp",magi1));
+disp(sprintf("The current in Lower branch is %f Amp",magi2));
+disp(sprintf("The Total current is %f Amp",magI));
//
pf=cos(phi); //
disp("SOLUTION (c)");
-disp(sprintf("The Power factor is %.3f", pf));
+disp(sprintf("The Power factor is %f", pf));
//
disp("SOLUTION (d)");
-disp(sprintf("The voltage across series branch is %.1f V", mage12));
-disp(sprintf("The voltage across parallel branch is %.0f V", mage23));
+disp(sprintf("The voltage across series branch is %f V", mage12));
+disp(sprintf("The voltage across parallel branch is %f V", mage23));
//
-tp=V*magI*pf; //total power
+tp=V*magI*pf;
disp("SOLUTION (e)");
-disp(sprintf("The total power absorbed in circuit is %d W", tp));// the text book answer is 6480 W
+disp(sprintf("The total power absorbed in circuit is %f W", tp));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.4/Ex2_4.sce b/1445/CH2/EX2.4/Ex2_4.sce
index 7045a8f28..d39171e75 100644
--- a/1445/CH2/EX2.4/Ex2_4.sce
+++ b/1445/CH2/EX2.4/Ex2_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 4
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 4");
@@ -9,13 +10,10 @@ v_m=10; //peak value of voltage in Volts
angle=60*(%pi/180); //delay angle in radians
//SOLUTION
-//average value Vav by integrating v over 0 to pi and dividing by pi
v_av=(integrate('v_m*sin(x)','x',angle,%pi))/(%pi);
-//effective value
v_rms=(integrate('(v_m*sin(x))^2','x',angle,%pi))/(%pi);
v_rms=sqrt(v_rms);
-disp(sprintf("Average value of full wave rectifier sine wave is %4.2f V",v_av));// truncade to two decimals
-// //text book answer is 4.78
-disp(sprintf("Effective value of full wave rectifier sine wave is %4.2f V",v_rms));//text book answer is 6.33
+disp(sprintf("Average value of full wave rectifier sine wave is %f V",v_av));
+disp(sprintf("Effective value of full wave rectifier sine wave is %f V",v_rms));
//END
diff --git a/1445/CH2/EX2.40/Ex2_40.sce b/1445/CH2/EX2.40/Ex2_40.sce
index e70e3d40c..6b07c1b9a 100644
--- a/1445/CH2/EX2.40/Ex2_40.sce
+++ b/1445/CH2/EX2.40/Ex2_40.sce
@@ -1,12 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 40 // read it as example 39 in the book on page 2.98
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 40");
-//
-//Given
-//V=100.sin(314.t+5) V
-//current is i=5.sin (314.t-40)
+
//VARIABLE INITIALIZATION
V=100; // max amplitude of wave
w=314; //angular speed
@@ -16,12 +14,12 @@ phiI=-40; //phase angle in current in deg
//
//SOLUTION
-phi=phiI-phiV; // phase difference
+phi=phiI-phiV;
pf=cos(phi*%pi/180); //convert to radians
p=(V/sqrt(2))*(I/sqrt(2))*pf;
//
-disp(sprintf("The Power factor is %.3f lagging", pf));
-disp(sprintf("The Power delivered is %.2f W", p));
+disp(sprintf("The Power factor is %f lagging", pf));
+disp(sprintf("The Power delivered is %f W", p));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.41/Ex2_41.sce b/1445/CH2/EX2.41/Ex2_41.sce
index 48ca080c2..5d1c14a4e 100644
--- a/1445/CH2/EX2.41/Ex2_41.sce
+++ b/1445/CH2/EX2.41/Ex2_41.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 41 // read it as example 40 in the book on page 2.99
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 41");
@@ -15,18 +16,18 @@ lampI=lampW/lampV;
lampR=lampW/lampI^2; //W=I^2.R
//
disp("SOLUTION (a)");
-disp(sprintf("The resistance of the lamp is t is %.2f Ohms", lampR));
+disp(sprintf("The resistance of the lamp is t is %f Ohms", lampR));
//
//in purely resistive / non inductive circuit,V=IR applies, and R=lampR+R
R=V/lampI-lampR;
-disp(sprintf("The value value of resistor to be placed in series with the lamp is %.0f Ohms", R));
+disp(sprintf("The value value of resistor to be placed in series with the lamp is %f Ohms", R));
//
//in case of inductance
//XL=2*%pi*f*L;
//V=Z.I where Z^2=R^2+XL^2
//L=sqrt((V^2/I^2-R^2)/2*%pi*f)
L=sqrt((V/lampI)^2-lampR^2)/(2*%pi*f);
-disp(sprintf("The inductive resistance to be placed is %.4f H",L));
+disp(sprintf("The inductive resistance to be placed is %f H",L));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.42/Ex2_42.sce b/1445/CH2/EX2.42/Ex2_42.sce
index 4d3681898..9fba797b9 100644
--- a/1445/CH2/EX2.42/Ex2_42.sce
+++ b/1445/CH2/EX2.42/Ex2_42.sce
@@ -1,37 +1,34 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 42 // read it as example 41 in the book on page 2.100
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 42");
//VARIABLE INITIALIZATION
I=10; // max amplitude of wave in Amp
-rms1=5; //rms values of current
+rms1=5;
rms2=7.5;
rms3=10;
-phi1=30; //phase angles
+phi1=30;
phi2=-60;
phi3=45;
-f=50; //frequency in Hz
+f=50; //Hz
w=2*%pi*f;
//
//SOLUTION
-//in case of sinosoidal wave, average value of alternating quantity = RMS values/1.11
-av1=rms1/1.11; //average values of 1,2,3 currents
+av1=rms1/1.11;
av2=rms2/1.11;
av3=rms3/1.11;
disp("SOLUTION (i)");
-disp(sprintf("The average value of 1st current is %.2f Amp", av1));
-disp(sprintf("The average value of 2nd current is %.2f Amp", av2));
-disp(sprintf("The average value of 3rd current is %.2f Amp", av3));
+disp(sprintf("The average value of 1st current is %f Amp", av1));
+disp(sprintf("The average value of 2nd current is %f Amp", av2));
+disp(sprintf("The average value of 3rd current is %f Amp", av3));
//
-//instantaneous values of current
-//i(t)=RMS.sqrt(2).sin (w.t+phi)
-//w=2.pi.f which for 50 Hz coes to 314
disp("SOLUTION (ii)");
-disp(sprintf("The instantaneous value of 1st current is %.2f sin(%.0f*t+%.0f) Amp", rms1*sqrt(2), w,phi1));
-disp(sprintf("The instantaneous value of 2nd current is %.2f sin(%.0f*t%.0f) Amp", rms2*sqrt(2), w,phi2));
-disp(sprintf("The instantaneous value of 3rd current is %.2f sin(%.0f*t+%.0f) Amp", rms3*sqrt(2), w,phi3));
+disp(sprintf("The instantaneous value of 1st current is %f sin(%f*t+%f) Amp", rms1*sqrt(2), w,phi1));
+disp(sprintf("The instantaneous value of 2nd current is %f sin(%f*t%f) Amp", rms2*sqrt(2), w,phi2));
+disp(sprintf("The instantaneous value of 3rd current is %f sin(%f*t+%f) Amp", rms3*sqrt(2), w,phi3));
//
//instantaneous values of current at t=100msec=0.1 sec
t=0.1;
@@ -39,9 +36,9 @@ i1=(rms1*sqrt(2))*(sin(w*t+phi1*%pi/180));
i2=(rms2*sqrt(2))*(sin(w*t+phi2*%pi/180));
i3=(rms3*sqrt(2))*(sin(w*t+phi3*%pi/180));
disp("SOLUTION (iv)");
-disp(sprintf("The instantaneous value of 1st current is %.3f Amp at %.3f Sec", i1, t));
-disp(sprintf("The instantaneous value of 2nd current is %.3f Amp at %.3f Sec", i2, t));
-disp(sprintf("The instantaneous value of 3rd current is %.3f Amp at %.3f Sec", i3, t));
+disp(sprintf("The instantaneous value of 1st current is %f Amp at %f Sec", i1, t));
+disp(sprintf("The instantaneous value of 2nd current is %f Amp at %f Sec", i2, t));
+disp(sprintf("The instantaneous value of 3rd current is %f Amp at %f Sec", i3, t));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.43/Ex2_43.sce b/1445/CH2/EX2.43/Ex2_43.sce
index b4e1f6b76..44090eb66 100644
--- a/1445/CH2/EX2.43/Ex2_43.sce
+++ b/1445/CH2/EX2.43/Ex2_43.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 43 // read it as example 42 in the book on page 2.102
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 43");
@@ -14,8 +15,8 @@ f=50; //Hz
Iav=(1/(2*%pi))*integrate('5+5*sin(th)', 'th',0,2*%pi);
Ims=(1/(2*%pi))*integrate('(5+5*sin(th))^2', 'th',0,2*%pi);
//
-disp(sprintf("The average value of resultant current is %.2f Amp", Iav));
-disp(sprintf("The RMS value of resultant current is %.2f Amp", sqrt(Ims)));
+disp(sprintf("The average value of resultant current is %f Amp", Iav));
+disp(sprintf("The RMS value of resultant current is %f Amp", sqrt(Ims)));
disp(" ");
//
//END
diff --git a/1445/CH2/EX2.44/Ex2_44.sce b/1445/CH2/EX2.44/Ex2_44.sce
index b01b90a84..bd68d8081 100644
--- a/1445/CH2/EX2.44/Ex2_44.sce
+++ b/1445/CH2/EX2.44/Ex2_44.sce
@@ -1,22 +1,20 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 44
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 44");
-//given
-//current in the resistor is given by i=4+5.sin wt - 3.cos 3.wt
//VARIABLE INITIALIZATION
-r=20; //resistance in Ohms
+r=20; //in Ohms
//SOLUTION
-//Power consumed by the resistor is P=P0+P1+P2
p0=(4^2)*r;
p1=((5/sqrt(2))^2)*r;
p2=((3/sqrt(2))^2)*r;
p=p0+p1+p2;
I=sqrt(p/r);
disp(sprintf("The power consumed by the resistor is %d W",p));
-disp(sprintf("The effective value of current is %.1f A",I));
+disp(sprintf("The effective value of current is %f A",I));
//END
diff --git a/1445/CH2/EX2.45/Ex2_45.sce b/1445/CH2/EX2.45/Ex2_45.sce
index 9122b5be2..06f1c14ca 100644
--- a/1445/CH2/EX2.45/Ex2_45.sce
+++ b/1445/CH2/EX2.45/Ex2_45.sce
@@ -1,36 +1,36 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 45
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 45");
//VARIABLE INITIALIZATION
-L=1.405; //inductance in Henry
-r=40; //resistance in Ohms
-C=20/(10^6); //capacitance in Farad
-v=100; //voltage in Volts
+L=1.405; //in Henry
+r=40; //in Ohms
+c=20/(10^6); //in Farad
+v=100; //in Volts
//SOLUTION
-//resonant frequency f=1/2.pi.sqrt (L.C)
-f0=1/(2*%pi*sqrt(L*C));
+f0=1/(2*%pi*sqrt(L*c));
disp(sprintf("The frequency at which the circuit resonates is %d Hz",f0));
I0=v/r;
-disp(sprintf("The current drawn from the supply is %.1f A",I0));
+disp(sprintf("The current drawn from the supply is %f A",I0));
xl0=2*%pi*f0*L;
z0=sqrt((r^2)+(xl0^2));
vl0=I0*z0;
-disp(sprintf("The voltage across the coil is %.1f V",vl0));
+disp(sprintf("The voltage across the coil is %f V",vl0));
-xc0=1/(2*%pi*f0*C);
-disp(sprintf("The capcitative reactance is %.1f Ω",xc0));
+xc0=1/(2*%pi*f0*c);
+disp(sprintf("The capcitative reactance is %f Ω",xc0));
Q0=(2*%pi*f0*L)/r;
-disp(sprintf("The quality factor is %.3f", Q0));
+disp(sprintf("The quality factor is %f", Q0));
bw=r/L;
-disp(sprintf("The bandwidth is %.3f Hz",bw));
+disp(sprintf("The bandwidth is %f Hz",bw));
//END
diff --git a/1445/CH2/EX2.46/Ex2_46.sce b/1445/CH2/EX2.46/Ex2_46.sce
index 8b73830ef..d8a4b6452 100644
--- a/1445/CH2/EX2.46/Ex2_46.sce
+++ b/1445/CH2/EX2.46/Ex2_46.sce
@@ -1,12 +1,13 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 46
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 46");
//VARIABLE INITIALIZATION
-I=120-(%i*(50)); //given, current in Amperes
-v=8+(%i*(2)); //given, voltage in Volts
+I=120-(%i*(50)); //in Amperes
+v=8+(%i*(2)); //in Volts
//SOLUTION
@@ -21,12 +22,12 @@ endfunction;
//solution (i)
z=v/I;
angle_z=angle_v-angle_I;
-disp(sprintf("(i) The impedance is %.4f Ω,<%.2f degrees",z,angle_z));
+disp(sprintf("(i) The impedance is %f Ω, %f degrees",z,angle_z));
//solution (ii)
phi=angle_z;
pf=cos(phi*(%pi/180));
-disp(sprintf("(ii) The power factor is %.3f (lagging)",pf));
+disp(sprintf("(ii) The power factor is %f (lagging)",pf));
//solution (iii)
s=v*I;
@@ -37,7 +38,7 @@ x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
y=mag*sin(angle*(%pi/180));
endfunction;
[p,q]=pol2rect(s,angle_s);
-disp(sprintf("(iii) The power consumed is %.2f W",p));
-disp(sprintf(" The reactive power is %.2f VAR",q));
+disp(sprintf("(iii) The power consumed is %f W",p));
+disp(sprintf(" The reactive power is %f VAR",q));
//END
diff --git a/1445/CH2/EX2.47/Ex2_47.sce b/1445/CH2/EX2.47/Ex2_47.sce
index 1e5f6185b..6bffacc05 100644
--- a/1445/CH2/EX2.47/Ex2_47.sce
+++ b/1445/CH2/EX2.47/Ex2_47.sce
@@ -1,11 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 47
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 47");
-//given
-//current in the circuit is 5-j.10 A
//VARIABLE INITIALIZATION
r=10; //in Ohms
xl=8.66; //in Ohms
@@ -24,16 +23,14 @@ endfunction;
//solution(i)
v=I*z;
angle_v=angle_I+angle_z;
-disp(sprintf("(i) The applied voltage is %.1f V, %.2f degrees",v,angle_v));
+disp(sprintf("(i) The applied voltage is %f V, %f degrees",v,angle_v));
//solution (ii)
phi=angle_I-angle_v;
pf=cos(phi*(%pi/180));
-disp(sprintf("(ii) The power factor is %.3f (lagging)",pf));
+disp(sprintf("(ii) The power factor is %f (lagging)",pf));
//solution(iii)
-//S=phasor voltageXconjugate of phasor current
-//Converting v and I from polar to rectangular form
s=v*I;
angle_s=angle_v-angle_I;
//function to convert from polar form to rectangular form
@@ -42,7 +39,7 @@ x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
y=mag*sin(angle*(%pi/180));
endfunction;
[p,q]=pol2rect(s,angle_s);
-disp(sprintf("(iii) The active power is %.2f W",p));
-disp(sprintf(" The reactive power is %.2f VAR",q));
+disp(sprintf("(iii) The active power is %f W",p));
+disp(sprintf(" The reactive power is %f VAR",q));
//END
diff --git a/1445/CH2/EX2.48/Ex2_48.sce b/1445/CH2/EX2.48/Ex2_48.sce
index 9e93c267b..57c2b0e7b 100644
--- a/1445/CH2/EX2.48/Ex2_48.sce
+++ b/1445/CH2/EX2.48/Ex2_48.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 48
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 48");
@@ -10,7 +11,6 @@ pf2=0.6; //power factor of 2nd circuit
z=1; //this is an assumption
//SOLUTION
-//convert polar to rectangular form
angle1=acos(pf1)*(180/%pi); //in degrees
angle2=acos(pf2)*(180/%pi); //in degrees
//function to convert from polar form to rectangular form
@@ -32,6 +32,6 @@ endfunction;
[z,angle]=rect2pol(z_x,z_y);
angle_z=nr-angle;
pf=cos(angle_z*(%pi/180));
-disp(sprintf("The power factor of the combination is %.3f",pf));
+disp(sprintf("The power factor of the combination is %f",pf));
//END
diff --git a/1445/CH2/EX2.49/Ex2_49.sce b/1445/CH2/EX2.49/Ex2_49.sce
index a1cd3ec1d..916d4afa2 100644
--- a/1445/CH2/EX2.49/Ex2_49.sce
+++ b/1445/CH2/EX2.49/Ex2_49.sce
@@ -1,13 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 49
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 49");
-//Given
-//voltage V=200 <30
-//current 20 <60 and 40 <-30
-
//VARIABLE INITIALIZATION
v=200; //in Volts
angle_v=30; //in degrees
@@ -29,7 +26,7 @@ s1=v*I1;
angle_s1=-angle_v+angle_I1;
disp(sprintf("The apparent power in 1st branch is %d kVA",s1/1000));
[s1_x,s1_y]=pol2rect(s1,angle_s1);
-disp(sprintf("The true power in 1st branch is %.3f kW",s1_x/1000));
+disp(sprintf("The true power in 1st branch is %f kW",s1_x/1000));
disp(" ");
@@ -38,7 +35,7 @@ angle_s2=angle_v-angle_I2;
disp(sprintf("The apparent power in 2nd branch is %d kVA",s2/1000));
[s2_x,s2_y]=pol2rect(s2,angle_s2);
disp(sprintf("The true power in 2nd branch is %d kW",s2_x/1000));
-I=(I1_x+I2_x)+(%i*(I1_y+I2_y)); //disp(I);
+I=(I1_x+I2_x)+(%i*(I1_y+I2_y)); disp(I);
//function to convert from rectangular form to polar form
function [I,angle]=rect2pol(x,y);
@@ -46,12 +43,12 @@ I=sqrt((x^2)+(y^2));
angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
[I,angle]=rect2pol(real(I),imag(I));
-//disp(I);
+disp(I);
s=v*I;
angle_s=angle_v-angle;
-disp(sprintf("The apparent power in the main circuit is %.3f kVA",s/1000));
+disp(sprintf("The apparent power in the main circuit is %f kVA",s/1000));
[p,q]=pol2rect(s,angle_s);
-disp(sprintf("The true power in the main circuit is %.3f kW",p/1000));
+disp(sprintf("The true power in the main circuit is %f kW",p/1000));
//END
diff --git a/1445/CH2/EX2.5/Ex2_5.sce b/1445/CH2/EX2.5/Ex2_5.sce
index ce799fefc..4fbe07d32 100644
--- a/1445/CH2/EX2.5/Ex2_5.sce
+++ b/1445/CH2/EX2.5/Ex2_5.sce
@@ -1,30 +1,28 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 5
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 5");
//VARIABLE INITIALIZATION
-I1=0.75; //current in loop 1 in Amperes
-v=240; //voltage supply in Volts
-f=50; //frequency in Hertz
-p=80; //power consumed by the lamp in Watts
+I1=0.75; //in Amperes
+v=240; //in Volts
+f=50; //in Hertz
+p=80; //in Watts
//SOLUTION
-//V.I1.cos(Φ1) = P
-res=p/v; //I1cos(Φ1)
-pf1=res/I1; //1st power factor = cos(Φ1)
+res=p/v;
+pf1=res/I1; //1st power factor = cos(Φ1)
phi1=acos(pf1);
-res1=tan(phi1); //result1 = tan(Φ1)
-w=2*%pi*f; //w=2.pi.f
+res1=tan(phi1); //result1 = tan(Φ1)
+w=2*%pi*f;
//solution (a)
-//Given power factor = unity means cos(Φ2)=1
-//hence Φ2=0, tan (Φ2)=0
-res2=0; //result2 = tan(Φ2) as Φ2=0
+res2=0; //result2 = tan(Φ2)
Ic1=res*(res1-res2);
c1=Ic1/(v*w);
-disp(sprintf("(a) When power factor is unity, the value of capacitance is %4.2f μF",c1*(10^6))); // in mF
+disp(sprintf("(a) When power factor is unity, the value of capacitance is %f μF",c1*(10^6)));
//solution (b)
pf2=0.95; //given
@@ -32,7 +30,7 @@ phi2=acos(pf2);
res2=tan(phi2);
Ic2=res*(res1-res2);
c2=Ic2/(v*w);
-disp(sprintf("(b) When power factor is 0.95(lagging), the value of capacitance is %5.3f μF",c2*(10^6))); //textbook answer is 7.458 mF
+disp(sprintf("(b) When power factor is 0.95(lagging), the value of capacitance is %f μF",c2*(10^6)));
//END
diff --git a/1445/CH2/EX2.50/Ex2_50.sce b/1445/CH2/EX2.50/Ex2_50.sce
index 1c1aa59a3..e46eac363 100644
--- a/1445/CH2/EX2.50/Ex2_50.sce
+++ b/1445/CH2/EX2.50/Ex2_50.sce
@@ -1,14 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 50
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 50");
-//Given
-//three impedances
-//6+j5 ohm, 8-j6 ohm and 8+j10 ohm
-//Circuit in parallel
-//
//VARIABLE INITIALIZATION
z1=6+(%i*5); //impedance in Ohms
z2=8-(%i*6); //impedance in Ohms
@@ -16,10 +12,10 @@ z3=8+(%i*10); //impedance in Ohms
I=20; //in Amperes
//SOLUTION
-Y1=1/z1; // Admittance
+Y1=1/z1;
Y2=1/z2;
Y3=1/z3;
-Y=Y1+Y2+Y3; // Total admittance
+Y=Y1+Y2+Y3;
//function to convert from rectangular form to polar form
function [Y,angle]=rect2pol(x,y);
Y=sqrt((x^2)+(y^2));
@@ -38,11 +34,8 @@ angle_I2=angle_v-angle2;
I3=v/z3;
angle_I3=angle_v-angle3;
disp("The current in each branch in polar form is-");
-disp(sprintf(" %.3f A, %.2f degrees",I1,angle_I1));
-disp(sprintf(" %.3f A, %.2f degrees",I2,angle_I2));
-disp(sprintf(" %.3f A, %.2f degrees",I3,angle_I3));
-//Total current
-I=I1+I2+I3;
-disp(sprintf("The total current is %.3f A",I)); //Answer not clear in the book
-//
+disp(sprintf(" %f A, %f degrees",I1,angle_I1));
+disp(sprintf(" %f A, %f degrees",I2,angle_I2));
+disp(sprintf(" %f A, %f degrees",I3,angle_I3));
+
//END
diff --git a/1445/CH2/EX2.51/Ex2_51.sce b/1445/CH2/EX2.51/Ex2_51.sce
index 85f7d494b..90e9c5273 100644
--- a/1445/CH2/EX2.51/Ex2_51.sce
+++ b/1445/CH2/EX2.51/Ex2_51.sce
@@ -1,30 +1,25 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 51
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 51");
-//
-//Given
-// admittance of branches are:
-//Y1=0.4+j0.6
-//Y2=0.1+j0.4
-//Y3=0.06+j0.23
-//
+
//VARIABLE INITIALIZATION
Y1=0.4+(%i*0.6); //admittance of 1st branch in Siemens
Y2=0.1+(%i*0.4); //admittance of 2nd branch in Siemens
Y3=0.06+(%i*0.23); //admittance of 3rd branch in Siemens
//SOLUTION
-Y=Y1+Y2+Y3; // total admittance
+Y=Y1+Y2+Y3;
//function to convert from rectangular form to polar form
function [Y,angle]=rect2pol(x,y);
Y=sqrt((x^2)+(y^2));
angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
endfunction;
-[Y,angle]=rect2pol(real(Y),imag(Y));
-disp(sprintf("The total admittance of the circuit is %.3f S, %.2f degrees",Y,angle));
-z=1/Y;
-disp(sprintf("The impedance of the circuit is %.3f Ω, %.2f degrees",z,-angle));
-//
+[Y1,angle]=rect2pol(real(Y),imag(Y));
+disp(sprintf("The total admittance of the circuit is %f S, %f degrees",Y1,angle));
+z=1/Y1;
+disp(sprintf("The impedance of the circuit is %f Ω, %f degrees",z,-angle));
+
//END
diff --git a/1445/CH2/EX2.52/Ex2_52.sce b/1445/CH2/EX2.52/Ex2_52.sce
index d0d64ad6f..f3b5d6d93 100644
--- a/1445/CH2/EX2.52/Ex2_52.sce
+++ b/1445/CH2/EX2.52/Ex2_52.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 52
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 52");
@@ -49,29 +50,29 @@ r_tot=req+rp;
x_tot=xeq+xp;
[z_tot,angle_tot]=rect2pol(r_tot,x_tot);
Z=r_tot+x_tot*%i; //complex representation
-disp(sprintf("(a) The total impedance is %.3f Ω, %.2f degrees",z_tot,angle_tot));
+disp(sprintf("(a) The total impedance is %f Ω, %f degrees",z_tot,angle_tot));
//solution (b)
I=v/Z; //complex division
angle_I=-angle_tot;
[I_x,I_y]=pol2rect(I,angle_I);
-disp(sprintf("(b) The total currrent is (%.3f-j%.2f) A",real(I),imag(I)));
+disp(sprintf("(b) The total currrent is (%f-j%f) A",real(I),imag(I)));
//solution (c)
//Voltage drop across Z3
Vab=I*Z3;
-disp(sprintf(" The Voltage between AB is (%.3f-j%.2f) V",real(Vab),imag(Vab)));
+disp(sprintf(" The Voltage between AB is (%f-j%f) A",real(Vab),imag(Vab)));
//since we know that V=Vab+Vbc
Vbc=v-Vab;
-disp(sprintf(" The Voltage between BC is (%.3f-j%.2f) V",real(Vbc),imag(Vbc)));
+disp(sprintf(" The Voltage between BC is (%f-j%f) A",real(Vbc),imag(Vbc)));
I1=Vbc/Z1; //Branch 1 current
I2=Vbc/Z2; //branch 2 current
//I3=I, main branch current
[mag1,angle1]=rect2pol(real(I1),imag(I1));
[mag2,angle2]=rect2pol(real(I2),imag(I2));
-disp(sprintf("(c) Current in branch 1 is %.3f,< %.2f degrees A",mag1,angle1));
-disp(sprintf(" The currrent in branch 1 is (%.3f-j%.2f) A",real(I1),imag(I1)));
-disp(sprintf(" The current in branch 2 is %.3f A,<%.2f degrees A",mag2,angle2));
-disp(sprintf(" The currrent in branch 2 is (%.3f-j%.2f) A",real(I2),imag(I2)));
+disp(sprintf("(c) Current in branch 1 is %f A, %f degrees",mag1,angle1));
+disp(sprintf(" The currrent in branch 1 is (%f-j%f) A",real(I1),imag(I1)));
+disp(sprintf(" The current in branch 2 is %f A, %f degrees",mag2,angle2));
+disp(sprintf(" The currrent in branch 2 is (%f-j%f) A",real(I2),imag(I2)));
//END
diff --git a/1445/CH2/EX2.53/Ex2_53.sce b/1445/CH2/EX2.53/Ex2_53.sce
index ccdef8fb0..f18db0590 100644
--- a/1445/CH2/EX2.53/Ex2_53.sce
+++ b/1445/CH2/EX2.53/Ex2_53.sce
@@ -1,13 +1,10 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 53 Read Example 52 of the Text Book
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 53");
-//Given
-//Voltage 230 <30 V
-//Current in branches 20 <60 A & 40<-30 A
-//
//VARIABLE INITIALIZATION
v=230; //in Volts
angle_v=30; //in degrees
@@ -37,11 +34,11 @@ endfunction;
//solution (i)
z=v/I;
angle_z=angle_v-angle;
-disp(sprintf("(i) The total impedance of the circuit is %.2f Ω, %.2f degrees",z,angle_z));
+disp(sprintf("(i) The total impedance of the circuit is %f Ω, %f degrees",z,angle_z));
//solution (ii)
//disp(sprintf("The value of I is %f and angle is %f",I, angle_z));
-pf=cos(angle_z*(%pi/180)); //power factor
-p=v*I*pf; // Power taken
-disp(sprintf("(ii) The power taken is %.0f W",p));
+pf=cos(angle_z*(%pi/180));
+p=v*I*pf;
+disp(sprintf("(ii) The power taken is %f W",p));
//END
diff --git a/1445/CH2/EX2.54/Ex2_54.sce b/1445/CH2/EX2.54/Ex2_54.sce
index 4b6e43d75..766e3ffeb 100644
--- a/1445/CH2/EX2.54/Ex2_54.sce
+++ b/1445/CH2/EX2.54/Ex2_54.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 54 Read example 53 of the Book
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 54");
@@ -10,13 +11,7 @@ R=15; //in Ohms
L=260/1000; //in Henry
//SOLUTION
-//resonant Frequency is given by
-//fr= 1/ 2.pi.(sqrt (1/LC - R^2/L^2))
-//Q-factor is given by:
-//Qf=2.pi.fr.L/R
-//dynamic impedance is given by
-//Zr=L/C.R
-//
+
//solution (i)
f_r=(1/(2*%pi))*sqrt((1/(L*C)-(R^2/L^2)));
f_r=round(f_r); //to round off the value
@@ -24,10 +19,10 @@ disp(sprintf("(i) The resonant frequency is %d Hz",f_r));
//solution (ii)
q_factor=(2*%pi*f_r*L)/R;
-disp(sprintf("(ii) The Q-factor of the circuit is %.2f",q_factor));
+disp(sprintf("(ii) The Q-factor of the circuit is %f",q_factor));
//solution (iii)
Z_r=L/(C*R);
-disp(sprintf("(iii) The dynamic impedance of the circuit is %.0f Ω",Z_r));
+disp(sprintf("(iii) The dynamic impedance of the circuit is %f Ω",Z_r));
//END
diff --git a/1445/CH2/EX2.6/Ex2_6.sce b/1445/CH2/EX2.6/Ex2_6.sce
index 378b29151..61aedd2de 100644
--- a/1445/CH2/EX2.6/Ex2_6.sce
+++ b/1445/CH2/EX2.6/Ex2_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 6
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 6");
@@ -12,18 +13,17 @@ v=230; //in Volts
pf2=0.9; //power factor(lagging)
//SOLUTION
-//V.I1.cos(Φ1) = P
phi1=acos(pf1);
res1=tan(phi1); //result1 = tan(Φ1)
phi2=acos(pf2);
res2=tan(phi2); //result2 = tan(Φ2)
Ic=I1*pf1*(res1-res2);
-w=2*%pi*f; //w=2.pi.f
+w=2*%pi*f;
c=Ic/(v*w);
-disp(sprintf("The value of capacitance is %5.2f μF",c*(10^6)));//text book answer is 82.53 mF
-Qc=v*Ic; // reactive power in kVAr
-disp(sprintf("The reactive power is %6.4f kVAR",Qc/(10^3)));//text book answer is 1.3716
-I2=I1*(pf1/pf2); //I1.cos(Φ1) = I2.cos(Φ2)
-disp(sprintf("The new supply current is %5.2f A",I2));
+disp(sprintf("The value of capacitance is %f μF",c*(10^6)));
+Qc=v*Ic;
+disp(sprintf("The reactive power is %f kVAR",Qc/(10^3)));
+I2=I1*(pf1/pf2);
+disp(sprintf("The new supply current is %f A",I2));
//END
diff --git a/1445/CH2/EX2.7/Ex2_7.sce b/1445/CH2/EX2.7/Ex2_7.sce
index 97183894a..a2b70e663 100644
--- a/1445/CH2/EX2.7/Ex2_7.sce
+++ b/1445/CH2/EX2.7/Ex2_7.sce
@@ -1,24 +1,25 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 7
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 7");
//VARIABLE INITIALIZATION
-s1=300; //apparent power absorbed by the plant in kVA
+s1=300; //apparent power in kVA
pf1=0.65; //power factor(lagging)
pf2=0.85; //power factor(lagging)
//SOLUTION
//solution (a)
-p=s1*pf1; //active power P=S.cos(Φ)
-q1=sqrt((s1^2)-(p^2)); //Q=sqrt(S^2-P^2) in kVAr
-disp(sprintf("(a) To bring the power factor to unity, the capacitor bank should have a capacity of %3.0f kVAR",q1));
+p=s1*pf1; //active power
+q1=sqrt((s1^2)-(p^2));
+disp(sprintf("(a) To bring the power factor to unity, the capacitor bank should have a capacity of %f kVAR",q1));
//solution (b)
-s2=p/pf2; //since P=S.cos(Φ)
-q2=sqrt((s2^2)-(p^2)); //Q=sqrt(S^2-P^2) in kVAr
-disp(sprintf("(b) To bring the power factor to 85%% lagging, the capacitor bank should have a capacity of %3.0f kVAR",q2));
+s2=p/pf2;
+q2=sqrt((s2^2)-(p^2));
+disp(sprintf("(b) To bring the power factor to 85%% lagging, the capacitor bank should have a capacity of %f kVAR",q2));
//END
diff --git a/1445/CH2/EX2.8/Ex2_8.sce b/1445/CH2/EX2.8/Ex2_8.sce
index adfd7b625..4c5492c4e 100644
--- a/1445/CH2/EX2.8/Ex2_8.sce
+++ b/1445/CH2/EX2.8/Ex2_8.sce
@@ -1,31 +1,22 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 8
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 8");
-//Given
-//V=300.cos(314.t+20) volts
-//i=15.cos(314.t-10) Amp
-//
//VARIABLE INITIALIZATION
-//V=300.cos(314.t+20) volts
-//V=300.sin(314.t+110) volts as cos(theta)=sin(theta+90)
-//i=15.cos(314.t-10) Amp
-//i=15.sin(314.t+80) Amp as cos(theta)=sin(theta+90)
-//Now
-V=300/sqrt(2); //in Volts
-angle_V=110; //in degrees
+v=300/sqrt(2); //in Volts
+angle_v=110; //in degrees
I=15/sqrt(2); //in Amperes
angle_I=80; //in degrees
//SOLUTION
-Z=V/I; //circuit impedance
-angle_Z=angle_V-angle_I; //angle between current and voltage
+Z=v/I;
+angle_Z=angle_v-angle_I;
disp(sprintf("The circuit impedance is %d Ω",Z));
disp(sprintf("The phase angle is %d degrees",angle_Z));
-//Pav=Vm*Im.cos (phi) in RL circuit
-Pav=V*I*cos(angle_Z*(%pi/180)); //to convert angle_z from degrees to radians
-disp(sprintf("The average power drawn is %7.2f W",Pav));// textboo answer is 1949.85 w
+p_av=v*I*cos(angle_Z*(%pi/180)); //to convert angle_z from degrees to radians
+disp(sprintf("The average power drawn is %f W",p_av));
//END
diff --git a/1445/CH2/EX2.9/Ex2_9.sce b/1445/CH2/EX2.9/Ex2_9.sce
index 0fd9a5c6d..f2779616b 100644
--- a/1445/CH2/EX2.9/Ex2_9.sce
+++ b/1445/CH2/EX2.9/Ex2_9.sce
@@ -1,26 +1,20 @@
//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
//Example 9
+clc;
disp("CHAPTER 2");
disp("EXAMPLE 9");
-
//VARIABLE INITIALIZATION
-V=120; //voltage of lamp in Volts
-P=100; //in Watts
-Vsupp=220; //supply voltage in Volts
-f=50; //in Hertz
-//Equations to be used
-//Z=R+jXl
-//Vsupply=V+jVl=sqrt(V^2+Vl^2)
-//Hence Vl=sqrt(Vsupply^2-V^2)
-//P=VI
-//Xl=2.pi.f.L
+v1=120; //voltage of lamp in Volts
+p=100; //in Watts
+v2=220; //supply voltage in Volts
+f=50; //in Hertz
//SOLUTION
-Vl=sqrt((Vsupp^2)-(V^2));
-Xl=(V*Vl)/P;
-L=Xl/(2*%pi*f); //inductance
-disp(sprintf("The pure inductance should have a value of %6.4f H",L)); //text book answer is 0.7046 H
+vl=sqrt((v2^2)-(v1^2));
+xl=(v1*vl)/p;
+L=xl/(2*%pi*f);
+disp(sprintf("The pure inductance should have a value of %f H",L));
//END
diff --git a/1445/CH3/EX3.1/Ex3_1.sce b/1445/CH3/EX3.1/Ex3_1.sce
index f9883c955..697de879a 100644
--- a/1445/CH3/EX3.1/Ex3_1.sce
+++ b/1445/CH3/EX3.1/Ex3_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 1
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 1");
@@ -13,29 +14,29 @@ xc=10; //capacitive reactance in Ohms
//solution (i)
v_ph=v_l/sqrt(3); //phase voltage=(line voltage)/sqrt(3) for star connection
-disp(sprintf("(i) The phase voltage is %.2f V",v_ph));
+disp(sprintf("(i) The phase voltage is %f V",v_ph));
//solution (ii)
z_ph=sqrt((r^2)+(xc^2));
I_l=v_ph/z_ph; //phase current = line current for star connection
-disp(sprintf("(ii) The line current is %.2f A",I_l));
+disp(sprintf("(ii) The line current is %f A",I_l));
//solution (iii)
-disp(sprintf("(iii) The phase current is %.2f A",I_l));
+disp(sprintf("(iii) The phase current is %f A",I_l));
//solution (iv)
pow_fact=r/z_ph;
-disp(sprintf("(iv) The power factor of the circuit is %.2f (leading)",pow_fact));
+disp(sprintf("(iv) The power factor of the circuit is %f (leading)",pow_fact));
//solution (v)
p=sqrt(3)*v_l*I_l*pow_fact;
-disp(sprintf("(v) The total power absorbed is %.0f W",p));
+disp(sprintf("(v) The total power absorbed is %f W",p));
//solution (vi)
va=sqrt(3)*v_l*I_l;
-disp(sprintf("(vi) The apparent power is %.0f VA",va));
+disp(sprintf("(vi) The apparent power is %f VA",va));
var=sqrt((va^2)-(p^2));
-disp(sprintf("The reactive power is %.0f VAR",var));
+disp(sprintf("The reactive power is %f VAR",var));
//Answers (v) and (vi) are different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.11/Ex3_11.sce b/1445/CH3/EX3.11/Ex3_11.sce
index 03c2bf54d..b340b3974 100644
--- a/1445/CH3/EX3.11/Ex3_11.sce
+++ b/1445/CH3/EX3.11/Ex3_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 11
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 11");
@@ -35,9 +36,9 @@ x=inv(A)*b;
x1=x(1,:);
x2=x(2,:);
disp("Solution (b)");
-disp(sprintf("P1 + P2 = %.2f kW",power_sum));
-disp(sprintf("P1 - P2 = %.2f kW",power_diff));
-disp(sprintf("The two wattmeter readings are %.2f kW and %.2f kW",x1,x2));
+disp(sprintf("P1 + P2 = %f kW",power_sum));
+disp(sprintf("P1 - P2 = %f kW",power_diff));
+disp(sprintf("The two wattmeter readings are %f kW and %f kW",x1,x2));
//solution (c): when phi=60 or %pi/3
power_sum=20*cos(%pi/3);
@@ -48,9 +49,9 @@ x=inv(A)*b;
x1=x(1,:);
x2=x(2,:);
disp("Solution (c)");
-disp(sprintf("P1 + P2 = %.2f kW",power_sum));
-disp(sprintf("P1 - P2 = %.2f kW",power_diff));
-disp(sprintf("The two wattmeter readings are %.2f kW and %.2f kW",x1,x2));
+disp(sprintf("P1 + P2 = %f kW",power_sum));
+disp(sprintf("P1 - P2 = %f kW",power_diff));
+disp(sprintf("The two wattmeter readings are %f kW and %f kW",x1,x2));
//solution (d): when phi=90 or %pi/2
power_sum=20*cos(%pi/2);
@@ -61,8 +62,8 @@ x=inv(A)*b;
x1=x(1,:);
x2=x(2,:);
disp("Solution (d)");
-disp(sprintf("P1 + P2 = %.2f kW",power_sum));
-disp(sprintf("P1 - P2 = %.2f kW",power_diff));
-disp(sprintf("The two wattmeter readings are %.2f kW and %.2f kW",x1,x2));
+disp(sprintf("P1 + P2 = %f kW",power_sum));
+disp(sprintf("P1 - P2 = %f kW",power_diff));
+disp(sprintf("The two wattmeter readings are %f kW and %f kW",x1,x2));
//END
diff --git a/1445/CH3/EX3.12/Ex3_12.sce b/1445/CH3/EX3.12/Ex3_12.sce
index 07ceb2454..a7b1cdf9c 100644
--- a/1445/CH3/EX3.12/Ex3_12.sce
+++ b/1445/CH3/EX3.12/Ex3_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 12
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 12");
@@ -16,19 +17,19 @@ p1=w1+w2;
p2=w1-w2;
phi=atan((sqrt(3)*p2)/p1); //this equation comes from two-wattmeter method
pow_fact=cos(phi);
-disp(sprintf("(a) The power factor of the circuit is %.3f (leading)",pow_fact));
+disp(sprintf("(a) The power factor of the circuit is %f (leading)",pow_fact));
//solution (b)
I_l=p1/(sqrt(3)*v_l*pow_fact);
-disp(sprintf("(b) The line current is %.2f A",I_l));
+disp(sprintf("(b) The line current is %f A",I_l));
//solution (c)
v_ph=v_l/sqrt(3);
z_ph=v_ph/I_l; //phase current = line current for delta connection
r_ph=z_ph*pow_fact;
-disp(sprintf("(c) The resistance of each phase is %.2f Ω",r_ph));
+disp(sprintf("(c) The resistance of each phase is %f Ω",r_ph));
xc=sqrt((z_ph^2)-(r_ph^2));
c=1/(2*%pi*f*xc);
-disp(sprintf("The capacitance of each phase is %.3E F",c));
+disp(sprintf("The capacitance of each phase is %E F",c));
//END
diff --git a/1445/CH3/EX3.2/Ex3_2.sce b/1445/CH3/EX3.2/Ex3_2.sce
index c5a2d35e0..c3ef9143f 100644
--- a/1445/CH3/EX3.2/Ex3_2.sce
+++ b/1445/CH3/EX3.2/Ex3_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 2
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 2");
@@ -14,9 +15,9 @@ v_ph=v_l/sqrt(3); //phase voltage = (line voltage)/sqrt(3)
z_ph=v_ph/I_l; //phase current = line current for star connection
pow_fact=p/(sqrt(3)*v_l*I_l); //three-phase power = sqrt(3)*v_l*I_l*pow_fact
r_ph=z_ph*pow_fact; //from impedance tringle
-disp(sprintf("The resisatnce of each impedance is %.2f Ω",r_ph));
+disp(sprintf("The resisatnce of each impedance is %f Ω",r_ph));
x_ph=sqrt((z_ph^2)-(r_ph^2));
-disp(sprintf("The ractance of each impedance is %.2f Ω",x_ph));
+disp(sprintf("The ractance of each impedance is %f Ω",x_ph));
//END
diff --git a/1445/CH3/EX3.3/Ex3_3.sce b/1445/CH3/EX3.3/Ex3_3.sce
index e99995138..4af78e160 100644
--- a/1445/CH3/EX3.3/Ex3_3.sce
+++ b/1445/CH3/EX3.3/Ex3_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 3
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 3");
@@ -16,19 +17,19 @@ f=50; //frequency in Hertz
x_ph=2*(%pi)*f*l; //inductive reactance
z_ph=sqrt((r_ph^2)+(x_ph^2));
I_ph=v_l/z_ph; //phase voltage = line voltage for delta connection
-disp(sprintf("(a) The phase current is %.2f A",I_ph));
+disp(sprintf("(a) The phase current is %f A",I_ph));
//solution (b)
I_l=sqrt(3)*I_ph; //phase current = (line current)/sqrt(3) for delta connection
-disp(sprintf("(b) The line current is %.2f A",I_l));
+disp(sprintf("(b) The line current is %f A",I_l));
//solution (c)
pow_fact=r_ph/z_ph;
-disp(sprintf("(c) The power factor is %.3f (lagging)",pow_fact));
+disp(sprintf("(c) The power factor is %f (lagging)",pow_fact));
//solution (d)
p=sqrt(3)*v_l*I_l*pow_fact;
-disp(sprintf("(d) The power absorbed is %.0f W",p));
+disp(sprintf("(d) The power absorbed is %f W",p));
//Answer is different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.4/Ex3_4.sce b/1445/CH3/EX3.4/Ex3_4.sce
index 085e72919..b88459ab7 100644
--- a/1445/CH3/EX3.4/Ex3_4.sce
+++ b/1445/CH3/EX3.4/Ex3_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 4
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 4");
@@ -26,7 +27,7 @@ b=a-120; //lags by 120 degrees
//I_nc
I_na=sqrt((real(I))^2+(imag(I))^2);
c=a-240; // lags by another 120 degrees ie.,240 degrees
-disp(sprintf("The line currents are %.3f A (%.2f degrees), %.3f A (%.2f degrees) and %.3f A (%.2f degrees)",I_na,a,I_na,b,I_na,c));
+disp(sprintf("The line currents are %f A (%f degrees), %f A (%f degrees) and %f A (%f degrees)",I_na,a,I_na,b,I_na,c));
//line current lags phase current by 30 degrees, hence (-30)
@@ -39,7 +40,7 @@ b1=b-(-30);
//I_AC
I_AC=I_na/sqrt(3);
c1=c-(-30);
-disp(sprintf("The phase currents are %.3f A (%.2f degrees), %.3f A (%.2f degrees) and %.3f A (%.2f degrees)",I_AB,a1,I_BC,b1,I_AC,c1));
+disp(sprintf("The phase currents are %f A (%f degrees), %f A (%f degrees) and %f A (%f degrees)",I_AB,a1,I_BC,b1,I_AC,c1));
//converting z_delta from polar form to rectangular form
z=sqrt((real(z_delta))^2+(imag(z_delta))^2);
@@ -56,15 +57,15 @@ b2=b1+angle;
//v_AC
v_AC=I_AC*z;
c2=c1+angle;
-disp(sprintf("The phase voltages for the delta load are %.3f A (%.2f degrees), %.3f A (%.2f degrees) and %.3f A (%.2f degrees)",v_AB,a2,v_BC,b2,v_AC,c2));
+disp(sprintf("The phase voltages for the delta load are %f A (%f degrees), %f A (%f degrees) and %f A (%f degrees)",v_AB,a2,v_BC,b2,v_AC,c2));
p_AB=(I_AB^2)*real(z_delta);
p_load=3*p_AB;
-disp(sprintf("The power absorbed by the load is %.2f W",p_load));
+disp(sprintf("The power absorbed by the load is %f W",p_load));
p_l=3*(I_na^2)*real(z_wire);
-disp(sprintf("The power dissipated by the line is %.2f W",p_l));
+disp(sprintf("The power dissipated by the line is %f W",p_l));
p=p_load+p_l;
-disp(sprintf("The total power supplied by 3-ϕ source is %.2f W",p));
+disp(sprintf("The total power supplied by 3-ϕ source is %f W",p));
//Answers may be slightly different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.5/Ex3_5.sce b/1445/CH3/EX3.5/Ex3_5.sce
index 2804e3e92..f956a407d 100644
--- a/1445/CH3/EX3.5/Ex3_5.sce
+++ b/1445/CH3/EX3.5/Ex3_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 5
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 5");
@@ -18,7 +19,7 @@ disp(sprintf("(a) The total power is %d W",p1));
p2=w1-w2;
phi=atan((sqrt(3)*p2)/p1); //this equation comes from two-wattmeter method
pow_fact=cos(phi);
-disp(sprintf("(b) The power factor of the load is %.3f", pow_fact));
+disp(sprintf("(b) The power factor of the load is %f", pow_fact));
//END
diff --git a/1445/CH3/EX3.6/Ex3_6.sce b/1445/CH3/EX3.6/Ex3_6.sce
index 52cdce49a..192081a59 100644
--- a/1445/CH3/EX3.6/Ex3_6.sce
+++ b/1445/CH3/EX3.6/Ex3_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 6
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 6");
@@ -14,17 +15,17 @@ pow_fact=0.81;
//solution (a)
p_in=p_out/eff;
-disp(sprintf("(a) The motor input is %.2f kW",p_in/1000));
+disp(sprintf("(a) The motor input is %f kW",p_in/1000));
//solution (b)
I=p_in/(sqrt(3)*v_l*pow_fact);//phase current = line current for star connection
-disp(sprintf("(b) The line and phase current of the alternator is %.2f A",I));
+disp(sprintf("(b) The line and phase current of the alternator is %f A",I));
//solution (c)
I_l=I;
I_ph=I_l/sqrt(3); //phase current = (line current)/sqrt(3) for delta connection
-disp(sprintf("(c) The line current of the motor is %.2f A",I_l));
-disp(sprintf("The phase current of the motor is %.2f A",I_ph));
+disp(sprintf("(c) The line current of the motor is %f A",I_l));
+disp(sprintf("The phase current of the motor is %f A",I_ph));
//Answers may be different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.7/Ex3_7.sce b/1445/CH3/EX3.7/Ex3_7.sce
index 3371d0fe9..68e1d82ad 100644
--- a/1445/CH3/EX3.7/Ex3_7.sce
+++ b/1445/CH3/EX3.7/Ex3_7.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 7
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 7");
@@ -19,7 +20,7 @@ disp(sprintf("The current in the three phases are %d A, %d A and %d A",I1,I2,I3)
I_x=0+I2*(sqrt(3)/2)-I3*(sqrt(3)/2); //x-component of the three currents =>I_x = I1*cos(90) + I2*cos(30) + I3*cos(30)
I_y=I1-(I2*0.5)-(I3*0.5); //y-component of the three currents =>I_y = I1*sin(90) + I2*sin(30) + I3*sin(30)
I=sqrt((I_x^2)+(I_y^2));
-disp(sprintf("The neutral current is %.2f A",I));
+disp(sprintf("The neutral current is %f A",I));
p1=v_ph*I1; //power consumed in 1st phase
p2=v_ph*I2; //power consumed in 2nd phase
diff --git a/1445/CH3/EX3.8/Ex3_8.sce b/1445/CH3/EX3.8/Ex3_8.sce
index bfc910b2f..450ea5b3e 100644
--- a/1445/CH3/EX3.8/Ex3_8.sce
+++ b/1445/CH3/EX3.8/Ex3_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 8
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 8");
@@ -15,20 +16,20 @@ phi=atan(imag(z)/real(z)); //atan() gives output in radians
I_ph=v_ph/z_mag;
I_l=sqrt(3)*I_ph;
-disp(sprintf("The line current is %.2f A",I_l));
+disp(sprintf("The line current is %f A",I_l));
pow_fact=cos(phi);
-disp(sprintf("The power factor is %.2f",pow_fact));
+disp(sprintf("The power factor is %f",pow_fact));
p=sqrt(3)*v_ph*I_l*pow_fact; //phase volt=line volt in delta connection(v_l=v_ph)
-disp(sprintf("The power is %.2f W",p));
+disp(sprintf("The power is %f W",p));
var=sqrt(3)*v_ph*I_l*sin(phi);
var=var/1000; //from VAR to kVAR
-disp(sprintf("The reactive power is %.2f kVAR",var));
+disp(sprintf("The reactive power is %f kVAR",var));
va=sqrt(3)*v_ph*I_l;
va=va/1000; //from VA to kVA
-disp(sprintf("The total volt amperes is %.2f kVA",va));
+disp(sprintf("The total volt amperes is %f kVA",va));
//END
diff --git a/1445/CH4/EX4.1/Ex4_1.sce b/1445/CH4/EX4.1/Ex4_1.sce
index e46040447..298c0cf4c 100644
--- a/1445/CH4/EX4.1/Ex4_1.sce
+++ b/1445/CH4/EX4.1/Ex4_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 1
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 1");
@@ -12,7 +13,7 @@ ar=15/10000; //area in m^2
//SOLUTION
T_d=N*B*I*ar;
-disp(sprintf("The deflecting torque exerted on the coil is %.3f N-m",T_d));
+disp(sprintf("The deflecting torque exerted on the coil is %f N-m",T_d));
//END
diff --git a/1445/CH4/EX4.10/Ex4_10.sce b/1445/CH4/EX4.10/Ex4_10.sce
index b60ae7828..1d25807e6 100644
--- a/1445/CH4/EX4.10/Ex4_10.sce
+++ b/1445/CH4/EX4.10/Ex4_10.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 10
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 10");
diff --git a/1445/CH4/EX4.11/Ex4_11.sce b/1445/CH4/EX4.11/Ex4_11.sce
index c52886b03..3126484f3 100644
--- a/1445/CH4/EX4.11/Ex4_11.sce
+++ b/1445/CH4/EX4.11/Ex4_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 11
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 11");
diff --git a/1445/CH4/EX4.12/Ex4_12.sce b/1445/CH4/EX4.12/Ex4_12.sce
index 4b5b1249e..006e41585 100644
--- a/1445/CH4/EX4.12/Ex4_12.sce
+++ b/1445/CH4/EX4.12/Ex4_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 12
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 12");
diff --git a/1445/CH4/EX4.2/Ex4_2.sce b/1445/CH4/EX4.2/Ex4_2.sce
index 701df6ff4..2a1b004b4 100644
--- a/1445/CH4/EX4.2/Ex4_2.sce
+++ b/1445/CH4/EX4.2/Ex4_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 2
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 2");
@@ -13,7 +14,7 @@ emf=2; //emf of cell in Volts
//SOLUTION
I=emf/r; //current in the circuit
I_g=(S*I)/(S+G);
-disp(sprintf("The current through the galvanometer is %.3f A",I_g));
+disp(sprintf("The current through the galvanometer is %f A",I_g));
//END
diff --git a/1445/CH4/EX4.3/Ex4_3.sce b/1445/CH4/EX4.3/Ex4_3.sce
index b66ea829a..a6997554a 100644
--- a/1445/CH4/EX4.3/Ex4_3.sce
+++ b/1445/CH4/EX4.3/Ex4_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 3
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 3");
@@ -12,7 +13,7 @@ G=2970; //in Ohms
//SOLUTION
S=(G*I_g)/(I-I_g); //since I_g=(S*I)/(S+G);
-disp(sprintf("The wire should have a resistance of %.0f Ω",S));
+disp(sprintf("The wire should have a resistance of %f Ω",S));
//END
diff --git a/1445/CH4/EX4.4/Ex4_4.sce b/1445/CH4/EX4.4/Ex4_4.sce
index 67b16af41..179ac1fea 100644
--- a/1445/CH4/EX4.4/Ex4_4.sce
+++ b/1445/CH4/EX4.4/Ex4_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 4
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 4");
@@ -15,12 +16,12 @@ V=500; //in Volts
//solution (a)
R_sh=r_A/((I/I_A)-1); //(I/I_A) is the multiplying factor of the shunt
-disp(sprintf("The required shunt resistance is %.2f Ω",R_sh));
+disp(sprintf("The required shunt resistance is %f Ω",R_sh));
//solutuion (b)
r=V/I_A; //total resistance required
R_se=r-r_A;
-disp(sprintf("The required resistance to be added in series is %.3f Ω",R_se));
+disp(sprintf("The required resistance to be added in series is %f Ω",R_se));
//END
diff --git a/1445/CH4/EX4.5/Ex4_5.sce b/1445/CH4/EX4.5/Ex4_5.sce
index 92c7bc1cf..d61469385 100644
--- a/1445/CH4/EX4.5/Ex4_5.sce
+++ b/1445/CH4/EX4.5/Ex4_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 5
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 5");
@@ -14,10 +15,10 @@ rev_act=360; //actual number of revolutions
//SOLUTION
E=(v*I*pow_fact)/1000; //'E' is energy consumed in one hour in kWh
rev=m_c*E; //number of revolutions for true energy
-disp(sprintf("The number of revolutions made by the meter is %.0f",rev));
+disp(sprintf("The number of revolutions made by the meter is %f",rev));
err=(rev_act-rev)/rev; //error
err=err*100; //percentage error
-disp(sprintf("The percentage error is %.2f %%",err));
+disp(sprintf("The percentage error is %f %%",err));
if(err<0) then
disp("The negative sign indicates that the meter will run slow");
end
diff --git a/1445/CH4/EX4.6/Ex4_6.sce b/1445/CH4/EX4.6/Ex4_6.sce
index 73dca4c0c..3c5440055 100644
--- a/1445/CH4/EX4.6/Ex4_6.sce
+++ b/1445/CH4/EX4.6/Ex4_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 6
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 6");
@@ -12,6 +13,6 @@ v=500; //in Volts
//SOLUTION
r_m=v_m/I_m; //resistance of moving-coil instrument
r_s=(v/I_m)-r_m;
-disp(sprintf("The series resistance to measure 500 V on full scale is %.2f Ω",r_s));
+disp(sprintf("The series resistance to measure 500 V on full scale is %f Ω",r_s));
//END
diff --git a/1445/CH4/EX4.7/Ex4_7.sce b/1445/CH4/EX4.7/Ex4_7.sce
index 9dc6529ee..0d93f14aa 100644
--- a/1445/CH4/EX4.7/Ex4_7.sce
+++ b/1445/CH4/EX4.7/Ex4_7.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 7
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 7");
@@ -14,10 +15,10 @@ rev_act=350; //actual revolution
//SOLUTION
E=(v*I*pow_fact)/1000; //from Wh to kWh
rev_true=m_c*E;
-disp(sprintf("The number of revolutions made by the meter is %.0f",rev_true));
+disp(sprintf("The number of revolutions made by the meter is %f",rev_true));
err=(rev_act-rev_true)/rev_true;
err=err*100; //percentage error
-disp(sprintf("The percentage error is %.2f %%",err));
+disp(sprintf("The percentage error is %f %%",err));
if(err<0) then
disp("The negative sign indicates that the meter will run slow");
end
diff --git a/1445/CH4/EX4.8/Ex4_8.sce b/1445/CH4/EX4.8/Ex4_8.sce
index d298ccbd6..208eba54d 100644
--- a/1445/CH4/EX4.8/Ex4_8.sce
+++ b/1445/CH4/EX4.8/Ex4_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 8
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 8");
@@ -12,10 +13,10 @@ v=30; //in Volts
//SOLUTION
R_sh=(I_m*r_m)/I; //I_m=I*(R_sh/(R_sh+r_m)) if R_sh<<5Ω, then I_m=I*(R_sh/r_m) neglecting R_sh in the denominator
-disp(sprintf("In order to read upto 2A, a shunt of %.2f Ω has to be connected in parallel",R_sh));
+disp(sprintf("In order to read upto 2A, a shunt of %f Ω has to be connected in parallel",R_sh));
R_se=(v-(I_m*r_m))/I_m;
-disp(sprintf("In order to read upto 30V, a resistance of %.2f Ω has to be connected in series",R_se));
+disp(sprintf("In order to read upto 30V, a resistance of %f Ω has to be connected in series",R_se));
//END
diff --git a/1445/CH4/EX4.9/Ex4_9.sce b/1445/CH4/EX4.9/Ex4_9.sce
index 037cea75c..525572a7f 100644
--- a/1445/CH4/EX4.9/Ex4_9.sce
+++ b/1445/CH4/EX4.9/Ex4_9.sce
@@ -1,6 +1,7 @@
//CHAPTER 4- MEASURING INSTRUMENTS
//Example 9
+clc;
disp("CHAPTER 4");
disp("EXAMPLE 9");
@@ -17,7 +18,7 @@ E1=(v*I*t*pow_fact)/1000; //energy consumed in 37 seconds in kWh
E2=rev/m_c; //energy consumption registered by meter
err=(E2-E1)/E1;
err=err*100; //percentage error
-disp(sprintf("The percentage error is %.2f %%",err));
+disp(sprintf("The percentage error is %f %%",err));
if(err<0) then
disp("The negative sign indicates that the meter will run slow");
end
diff --git a/1445/CH6/EX6.1/Ex6_1.sce b/1445/CH6/EX6.1/Ex6_1.sce
index f43815de9..3e01b084b 100644
--- a/1445/CH6/EX6.1/Ex6_1.sce
+++ b/1445/CH6/EX6.1/Ex6_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 6- MAGNETIC CIRCUITS
//Example 1
+clc;
disp("CHAPTER 6");
disp("EXAMPLE 1");
@@ -22,20 +23,20 @@ mu0=4*%pi*10^(-7);//absolute permeability in Henry/meters
//solution (i)
ar=l*l; //area of cross-section
rA=lA/(mu0*murA*ar);
-disp(sprintf("(i) Reluctance of part A is %.3E AT/Wb",rA));
+disp(sprintf("(i) Reluctance of part A is %E AT/Wb",rA));
lB=(AB-(l/2))+(BC-l)+(CD-(l/2));
rB=lB/(mu0*murB*ar);
-disp(sprintf("Reluctance of part B is %.3E AT/Wb",rB));
+disp(sprintf("Reluctance of part B is %E AT/Wb",rB));
//solution (ii)
lg=2*lg;
murg=1;
rg=lg/(mu0*murg*ar);
-disp(sprintf("(ii) Reluctance of the two air gaps is %.3E AT/Wb",rg));
+disp(sprintf("(ii) Reluctance of the two air gaps is %E AT/Wb",rg));
//solution (iii)
rT=rA+rB+rg;
-disp(sprintf("(iii) Total reluctance is %.2E AT/Wb",rT));
+disp(sprintf("(iii) Total reluctance is %E AT/Wb",rT));
//solution (iv)
mmf=N*I;
@@ -43,12 +44,12 @@ disp(sprintf("(iv) MMF is %d AT",mmf));
//solution (v)
totFlux=mmf/rT;
-disp(sprintf("(v) Total flux is %.3E Wb",totFlux));
+disp(sprintf("(v) Total flux is %E Wb",totFlux));
//solution (vi)
b=totFlux/ar;
-disp(sprintf("(vi) Flux density is %.3f Wb/m^2",b));
+disp(sprintf("(vi) Flux density is %f Wb/m^2",b));
//Answers of (v) and (vi) do not match due to calculation mistake in the book
diff --git a/1445/CH6/EX6.2/Ex6_2.sce b/1445/CH6/EX6.2/Ex6_2.sce
index 983c61b58..9b68c932f 100644
--- a/1445/CH6/EX6.2/Ex6_2.sce
+++ b/1445/CH6/EX6.2/Ex6_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 6- MAGNETIC CIRCUITS
//Example 2
+clc;
disp("CHAPTER 6");
disp("EXAMPLE 2");
@@ -21,26 +22,26 @@ disp(sprintf("(i) MMF is %d AT", mmf));
//solution (ii)
netMMF=(mmf-(0.35*mmf)); //mmf taken by iron path is 35% of total mmf
b=(mu0*netMMF)/lg; //phi=b*area, r=lg/(mu0*area) & mmf=phi*r => mmf=(b*lg)/mu0 => b=(mmf*mu0)/lg
-disp(sprintf("(ii) The flux density of the air gap is %.3E Wb/m^2", b));
+disp(sprintf("(ii) The flux density of the air gap is %E Wb/m^2", b));
//solution (iii)
ar=%pi*((ds/2)^2); //area of cross-section of circular section
phi=ar*b;
-disp(sprintf("(iii) The magnetic flux is %.3E Wb",phi));
+disp(sprintf("(iii) The magnetic flux is %E Wb",phi));
//solution (iv)
rt=mmf/phi;
-disp(sprintf("(iv) The total reluctance is %.4E AT/wb",rt));
+disp(sprintf("(iv) The total reluctance is %E AT/wb",rt));
//solution (v)
rg=lg/(mu0*ar); //reluctance of air gap
rs=rt-rg; //reluctance of steel
lr=%pi*dr; //circumference of ring
mur=lr/(mu0*rs*ar);
-disp(sprintf("(v) The relative permeability of the steel ring is %3.3E",mur));
+disp(sprintf("(v) The relative permeability of the steel ring is %E",mur));
//solution (vi)
-disp(sprintf("(vi) Reluctance of steel is %.2E AT/Wb",rs));
+disp(sprintf("(vi) Reluctance of steel is %E AT/Wb",rs));
//END
diff --git a/1445/CH6/EX6.3/Ex6_3.sce b/1445/CH6/EX6.3/Ex6_3.sce
index 906b2d0a8..7bcbc8c5c 100644
--- a/1445/CH6/EX6.3/Ex6_3.sce
+++ b/1445/CH6/EX6.3/Ex6_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 6- MAGNETIC CIRCUITS
//Example 3
+clc;
disp("CHAPTER 6");
disp("EXAMPLE 3");
diff --git a/1445/CH6/EX6.4/Ex6_4.sce b/1445/CH6/EX6.4/Ex6_4.sce
index 6ff7d2c9f..98bc14ab6 100644
--- a/1445/CH6/EX6.4/Ex6_4.sce
+++ b/1445/CH6/EX6.4/Ex6_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 6- MAGNETIC CIRCUITS
//Example 4
+clc;
disp("CHAPTER 6");
disp("EXAMPLE 4");
@@ -25,15 +26,15 @@ disp(sprintf("(a) MMF is %d Gilberts",mmf));
//solution (b)
//tot reluctance = iron reluctance + air gap reluctance(mur=1 for air)
totR=(li/(area*mu0*mui))+(lg/(area*mu0*1));
-disp(sprintf("(b) The total reluctance is %.3E Gilberts/Maxwell",totR));
+disp(sprintf("(b) The total reluctance is %E Gilberts/Maxwell",totR));
//solution (c)
phi=mmf/totR;
-disp(sprintf("(c) The flux in the circuit is %.3f Maxwell",phi));
+disp(sprintf("(c) The flux in the circuit is %f Maxwell",phi));
//solution (d)
b=phi/area;
-disp(sprintf("(d) The flux density in the circuit is %.3f Gauss",b));
+disp(sprintf("(d) The flux density in the circuit is %f Gauss",b));
//Answers of (b), (c) & (d) are different because absolute permeability is not included in (b)
diff --git a/1445/CH6/EX6.5/Ex6_5.sce b/1445/CH6/EX6.5/Ex6_5.sce
index 7bde18a7f..08d26c59a 100644
--- a/1445/CH6/EX6.5/Ex6_5.sce
+++ b/1445/CH6/EX6.5/Ex6_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 6- MAGNETIC CIRCUITS
//Example 5
+clc;
disp("CHAPTER 6");
disp("EXAMPLE 5");
@@ -37,7 +38,7 @@ disp(sprintf("MMF of cast steel is %d AT",ms));
totMMF=mg+mi+ms;
I=totMMF/N;
-disp(sprintf("Current through the coil is %.3f A",I));
+disp(sprintf("Current through the coil is %f A",I));
//END
diff --git a/1445/CH7/EX7.1/Ex7_1.sce b/1445/CH7/EX7.1/Ex7_1.sce
index c88808117..791f47aab 100644
--- a/1445/CH7/EX7.1/Ex7_1.sce
+++ b/1445/CH7/EX7.1/Ex7_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 1
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 1");
diff --git a/1445/CH7/EX7.10/Ex7_10.sce b/1445/CH7/EX7.10/Ex7_10.sce
index d9018d0ec..fda15a798 100644
--- a/1445/CH7/EX7.10/Ex7_10.sce
+++ b/1445/CH7/EX7.10/Ex7_10.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 10
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 10");
diff --git a/1445/CH7/EX7.11/Ex7_11.sce b/1445/CH7/EX7.11/Ex7_11.sce
index df17e61c0..841adda2b 100644
--- a/1445/CH7/EX7.11/Ex7_11.sce
+++ b/1445/CH7/EX7.11/Ex7_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 11
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 11");
diff --git a/1445/CH7/EX7.12/Ex7_12.sce b/1445/CH7/EX7.12/Ex7_12.sce
index 980b54bd2..0a800b41d 100644
--- a/1445/CH7/EX7.12/Ex7_12.sce
+++ b/1445/CH7/EX7.12/Ex7_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 12
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 12");
diff --git a/1445/CH7/EX7.13/Ex7_13.sce b/1445/CH7/EX7.13/Ex7_13.sce
index 047444eca..929b8fa10 100644
--- a/1445/CH7/EX7.13/Ex7_13.sce
+++ b/1445/CH7/EX7.13/Ex7_13.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 13
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 13");
//230/115 V single phase transformer
diff --git a/1445/CH7/EX7.14/Ex7_14.sce b/1445/CH7/EX7.14/Ex7_14.sce
index 4f635a60b..2a600355d 100644
--- a/1445/CH7/EX7.14/Ex7_14.sce
+++ b/1445/CH7/EX7.14/Ex7_14.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 14
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 14");
diff --git a/1445/CH7/EX7.15/Ex7_15.sce b/1445/CH7/EX7.15/Ex7_15.sce
index 62b09f20e..9487a0aeb 100644
--- a/1445/CH7/EX7.15/Ex7_15.sce
+++ b/1445/CH7/EX7.15/Ex7_15.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 15
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 15");
//20kVA single phase transformer
diff --git a/1445/CH7/EX7.16/Ex7_16.sce b/1445/CH7/EX7.16/Ex7_16.sce
index 99cf22818..568fb324f 100644
--- a/1445/CH7/EX7.16/Ex7_16.sce
+++ b/1445/CH7/EX7.16/Ex7_16.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 16
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 16");
diff --git a/1445/CH7/EX7.17/Ex7_17.sce b/1445/CH7/EX7.17/Ex7_17.sce
index 7ae2f47e6..55029114b 100644
--- a/1445/CH7/EX7.17/Ex7_17.sce
+++ b/1445/CH7/EX7.17/Ex7_17.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 17
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 17");
diff --git a/1445/CH7/EX7.18/Ex7_18.sce b/1445/CH7/EX7.18/Ex7_18.sce
index 5d9e22bf4..8d79f00b8 100644
--- a/1445/CH7/EX7.18/Ex7_18.sce
+++ b/1445/CH7/EX7.18/Ex7_18.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 18
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 18");
diff --git a/1445/CH7/EX7.19/Ex7_19.sce b/1445/CH7/EX7.19/Ex7_19.sce
index 5673a8c80..a9796ab48 100644
--- a/1445/CH7/EX7.19/Ex7_19.sce
+++ b/1445/CH7/EX7.19/Ex7_19.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 19
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 19");
diff --git a/1445/CH7/EX7.2/Ex7_2.sce b/1445/CH7/EX7.2/Ex7_2.sce
index df6d083dd..02d584db3 100644
--- a/1445/CH7/EX7.2/Ex7_2.sce
+++ b/1445/CH7/EX7.2/Ex7_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 2
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 2");
//
diff --git a/1445/CH7/EX7.20/Ex7_20.sce b/1445/CH7/EX7.20/Ex7_20.sce
index 0c5f59379..040768ce1 100644
--- a/1445/CH7/EX7.20/Ex7_20.sce
+++ b/1445/CH7/EX7.20/Ex7_20.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 20
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 20");
diff --git a/1445/CH7/EX7.21/Ex7_21.sce b/1445/CH7/EX7.21/Ex7_21.sce
index 7135f11c4..27090dac9 100644
--- a/1445/CH7/EX7.21/Ex7_21.sce
+++ b/1445/CH7/EX7.21/Ex7_21.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 21
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 21");
diff --git a/1445/CH7/EX7.22/Ex7_22.sce b/1445/CH7/EX7.22/Ex7_22.sce
index 8262bd109..4b152a71c 100644
--- a/1445/CH7/EX7.22/Ex7_22.sce
+++ b/1445/CH7/EX7.22/Ex7_22.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 22
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 22");
diff --git a/1445/CH7/EX7.23/Ex7_23.sce b/1445/CH7/EX7.23/Ex7_23.sce
index c794f2e98..9e0412b48 100644
--- a/1445/CH7/EX7.23/Ex7_23.sce
+++ b/1445/CH7/EX7.23/Ex7_23.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 23
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 23");
diff --git a/1445/CH7/EX7.24/Ex7_24.sce b/1445/CH7/EX7.24/Ex7_24.sce
index 6a74149b1..76560fb9d 100644
--- a/1445/CH7/EX7.24/Ex7_24.sce
+++ b/1445/CH7/EX7.24/Ex7_24.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 24
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 24");
diff --git a/1445/CH7/EX7.25/Ex7_25.sce b/1445/CH7/EX7.25/Ex7_25.sce
index acb81a060..27527af69 100644
--- a/1445/CH7/EX7.25/Ex7_25.sce
+++ b/1445/CH7/EX7.25/Ex7_25.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 25
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 25");
diff --git a/1445/CH7/EX7.26/Ex7_26.sce b/1445/CH7/EX7.26/Ex7_26.sce
index 7fed48bc9..e523c979b 100644
--- a/1445/CH7/EX7.26/Ex7_26.sce
+++ b/1445/CH7/EX7.26/Ex7_26.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 26
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 26");
diff --git a/1445/CH7/EX7.27/Ex7_27.sce b/1445/CH7/EX7.27/Ex7_27.sce
index b72abacee..5aebe882d 100644
--- a/1445/CH7/EX7.27/Ex7_27.sce
+++ b/1445/CH7/EX7.27/Ex7_27.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 27
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 27");
diff --git a/1445/CH7/EX7.28/Ex7_28.sce b/1445/CH7/EX7.28/Ex7_28.sce
index 022c5502e..26f99bedb 100644
--- a/1445/CH7/EX7.28/Ex7_28.sce
+++ b/1445/CH7/EX7.28/Ex7_28.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 28
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 28");
diff --git a/1445/CH7/EX7.29/Ex7_29.sce b/1445/CH7/EX7.29/Ex7_29.sce
index 5e8b2f759..d863e904f 100644
--- a/1445/CH7/EX7.29/Ex7_29.sce
+++ b/1445/CH7/EX7.29/Ex7_29.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 29
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 29");
diff --git a/1445/CH7/EX7.3/Ex7_3.sce b/1445/CH7/EX7.3/Ex7_3.sce
index 870db87c8..27d3af3fc 100644
--- a/1445/CH7/EX7.3/Ex7_3.sce
+++ b/1445/CH7/EX7.3/Ex7_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 3
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 3");
//
diff --git a/1445/CH7/EX7.30/Ex7_30.sce b/1445/CH7/EX7.30/Ex7_30.sce
index 7d78d4b84..ecc52cbac 100644
--- a/1445/CH7/EX7.30/Ex7_30.sce
+++ b/1445/CH7/EX7.30/Ex7_30.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 30
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 30");
diff --git a/1445/CH7/EX7.31/Ex7_31.sce b/1445/CH7/EX7.31/Ex7_31.sce
index 0150a59be..7e4212e6d 100644
--- a/1445/CH7/EX7.31/Ex7_31.sce
+++ b/1445/CH7/EX7.31/Ex7_31.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 31
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 31");
diff --git a/1445/CH7/EX7.32/Ex7_32.sce b/1445/CH7/EX7.32/Ex7_32.sce
index 05a91a7ea..0d6d9773e 100644
--- a/1445/CH7/EX7.32/Ex7_32.sce
+++ b/1445/CH7/EX7.32/Ex7_32.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 32
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 32");
diff --git a/1445/CH7/EX7.33/Ex7_33.sce b/1445/CH7/EX7.33/Ex7_33.sce
index 35ea4a24d..756770ef5 100644
--- a/1445/CH7/EX7.33/Ex7_33.sce
+++ b/1445/CH7/EX7.33/Ex7_33.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 33
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 33");
diff --git a/1445/CH7/EX7.34/Ex7_34.sce b/1445/CH7/EX7.34/Ex7_34.sce
index eaf48effe..aab171f49 100644
--- a/1445/CH7/EX7.34/Ex7_34.sce
+++ b/1445/CH7/EX7.34/Ex7_34.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 35
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 35");
diff --git a/1445/CH7/EX7.35/Ex7_35.sce b/1445/CH7/EX7.35/Ex7_35.sce
index 1d5f68a38..4469bdb5e 100644
--- a/1445/CH7/EX7.35/Ex7_35.sce
+++ b/1445/CH7/EX7.35/Ex7_35.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 36
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 36");
diff --git a/1445/CH7/EX7.36/Ex7_36.sce b/1445/CH7/EX7.36/Ex7_36.sce
index 860243a80..5a9744090 100644
--- a/1445/CH7/EX7.36/Ex7_36.sce
+++ b/1445/CH7/EX7.36/Ex7_36.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 36
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 36");
diff --git a/1445/CH7/EX7.37/Ex7_37.sce b/1445/CH7/EX7.37/Ex7_37.sce
index b4d21103f..8dcea4ab0 100644
--- a/1445/CH7/EX7.37/Ex7_37.sce
+++ b/1445/CH7/EX7.37/Ex7_37.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 37
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 37");
diff --git a/1445/CH7/EX7.38/Ex7_38.sce b/1445/CH7/EX7.38/Ex7_38.sce
index 080504a42..69bd2ea5e 100644
--- a/1445/CH7/EX7.38/Ex7_38.sce
+++ b/1445/CH7/EX7.38/Ex7_38.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 38
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 38");
diff --git a/1445/CH7/EX7.39/Ex7_39.sce b/1445/CH7/EX7.39/Ex7_39.sce
index 0d9677643..c71d2d663 100644
--- a/1445/CH7/EX7.39/Ex7_39.sce
+++ b/1445/CH7/EX7.39/Ex7_39.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 39
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 39");
diff --git a/1445/CH7/EX7.4/Ex7_4.sce b/1445/CH7/EX7.4/Ex7_4.sce
index 4f6586072..021dca99e 100644
--- a/1445/CH7/EX7.4/Ex7_4.sce
+++ b/1445/CH7/EX7.4/Ex7_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 4
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 4");
diff --git a/1445/CH7/EX7.40/Ex7_40.sce b/1445/CH7/EX7.40/Ex7_40.sce
index a78c44b1d..433c7f64a 100644
--- a/1445/CH7/EX7.40/Ex7_40.sce
+++ b/1445/CH7/EX7.40/Ex7_40.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 40
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 40");
diff --git a/1445/CH7/EX7.41/Ex7_41.sce b/1445/CH7/EX7.41/Ex7_41.sce
index ffab26d2c..6d25f575a 100644
--- a/1445/CH7/EX7.41/Ex7_41.sce
+++ b/1445/CH7/EX7.41/Ex7_41.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 41
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 41");
diff --git a/1445/CH7/EX7.5/Ex7_5.sce b/1445/CH7/EX7.5/Ex7_5.sce
index cd6b7f3b3..a952fe8ad 100644
--- a/1445/CH7/EX7.5/Ex7_5.sce
+++ b/1445/CH7/EX7.5/Ex7_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 5
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 5");
diff --git a/1445/CH7/EX7.6/Ex7_6.sce b/1445/CH7/EX7.6/Ex7_6.sce
index 2abcb8cf9..be29d322e 100644
--- a/1445/CH7/EX7.6/Ex7_6.sce
+++ b/1445/CH7/EX7.6/Ex7_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 6
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 6");
diff --git a/1445/CH7/EX7.8/Ex7_8.sce b/1445/CH7/EX7.8/Ex7_8.sce
index e53aed921..9f4d96d15 100644
--- a/1445/CH7/EX7.8/Ex7_8.sce
+++ b/1445/CH7/EX7.8/Ex7_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 8
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 8");
diff --git a/1445/CH7/EX7.9/Ex7_9.sce b/1445/CH7/EX7.9/Ex7_9.sce
index 4a53d3b70..a8312d582 100644
--- a/1445/CH7/EX7.9/Ex7_9.sce
+++ b/1445/CH7/EX7.9/Ex7_9.sce
@@ -1,6 +1,7 @@
//CHAPTER 7- SINGLE PHASE TRANSFORMER
//Example 9
+clc;
disp("CHAPTER 7");
disp("EXAMPLE 9");
diff --git a/1445/CH8/EX8.1/Ex8_1.sce b/1445/CH8/EX8.1/Ex8_1.sce
index 05b16b236..ed8d63fa5 100644
--- a/1445/CH8/EX8.1/Ex8_1.sce
+++ b/1445/CH8/EX8.1/Ex8_1.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 1
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 1");
-//shunt generator
//VARIABLE INITIALIZATION
v_t=250; //terminal voltage in Volts
I_l=500; //load current in Amperes
@@ -12,10 +12,10 @@ r_a=0.04; //armature resistance in Ohms
r_f=50; //shunt field resistance in Ohms
//SOLUTION
-I_f=v_t/r_f; // current through the shunt field winding
-I_a=I_l+I_f; //Armature Current
+I_f=v_t/r_f;
+I_a=I_l+I_f;
E_a=v_t+(I_a*r_a); //E_a=emf of generator
-disp(sprintf("The generated emf is %.1f V",E_a));
+disp(sprintf("The generated emf is %f V",E_a));
//END
diff --git a/1445/CH8/EX8.10/Ex8_10.sce b/1445/CH8/EX8.10/Ex8_10.sce
index 0189c399a..4c286878c 100644
--- a/1445/CH8/EX8.10/Ex8_10.sce
+++ b/1445/CH8/EX8.10/Ex8_10.sce
@@ -1,14 +1,14 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 10
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 10");
-//6 pole DC machine with 400 conductors
//VARIABLE INITIALIZATION
P=6; //number of poles
I=80; //current per conductor in Amperes
-Z=400; //total number of conductors
+Z=400; //tottal number of conductors
phi=0.020; //flux per pole in Wb
N=1800; //in rpm
@@ -18,39 +18,39 @@ N=1800; //in rpm
disp("(a) For Wave connected");
//(i)
-A=2; //A=number of parallel paths =2 for wave connected conductors
+A=2; //A=number of parallel paths
I_a=I*A;
-disp(sprintf("(i) The total current is %.0f A",I_a));
+disp(sprintf("(i) The total current is %f A",I_a));
//(ii)
E_a=(phi*Z*N*P)/(60*A);
-disp(sprintf("(ii) The emf is %.0f V",E_a));
+disp(sprintf("(ii) The emf is %f V",E_a));
//(iii)
p=E_a*I_a;
-disp(sprintf("(iii) The power developed in armature is %.3f kW",p/1000));
+disp(sprintf("(iii) The power developed in armature is %f kW",p/1000));
w=(2*%pi*N)/60;
T_e=p/w;
-disp(sprintf("The electromagnetic torque is %.2f N-m",T_e));
+disp(sprintf("The electromagnetic torque is %f N-m",T_e));
//soluion (b): for lap connected
disp("(b) For Lap connected");
//(i)
-A=P; //P=6 is given
+A=P;
I_a=I*A;
-disp(sprintf("(i) The total current is %.0f A",I_a));
+disp(sprintf("(i) The total current is %f A",I_a));
//(ii)
-E_a=(phi*Z*N*P)/(60*A); // induced emf
-disp(sprintf("(ii) The emf is %.0f V",E_a));
+E_a=(phi*Z*N*P)/(60*A);
+disp(sprintf("(ii) The emf is %f V",E_a));
//(iii)
-p=E_a*I_a; //power developed in armature
-disp(sprintf("(iii) The power developed in armature is %.1f kW",p/1000));
-w=(2*%pi*N)/60; //armature rotation in RPS
-T_e=p/w; //Torque
-disp(sprintf("The electromagnetic torque is %.2f N-m",T_e));
+p=E_a*I_a;
+disp(sprintf("(iii) The power developed in armature is %f kW",p/1000));
+w=(2*%pi*N)/60;
+T_e=p/w;
+disp(sprintf("The electromagnetic torque is %f N-m",T_e));
//END
diff --git a/1445/CH8/EX8.11/Ex8_11.sce b/1445/CH8/EX8.11/Ex8_11.sce
index 839d676d0..09adc0d30 100644
--- a/1445/CH8/EX8.11/Ex8_11.sce
+++ b/1445/CH8/EX8.11/Ex8_11.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 11
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 11");
-//20 kW compound generator
//VARIABLE INITIALIZATION
p_o=20*1000; //output in W
v_t=250; //in Volts
@@ -16,10 +16,10 @@ r_sh=100; //shunt resistance in Ohms
I_t=p_o/v_t;
v_se=I_t*r_se; //for series winding
v_sh=v_t+v_se; //for shunt winding
-I_sh=v_sh/r_sh; //shunt curent
-I_a=I_sh+I_t; //armature current
-E_a=v_t+(I_a*r_a)+v_se; //induced emf
-disp(sprintf("The total emf generated is %.3f V",E_a));
+I_sh=v_sh/r_sh;
+I_a=I_sh+I_t;
+E_a=v_t+(I_a*r_a)+v_se;
+disp(sprintf("The total emf generated is %f V",E_a));
//END
diff --git a/1445/CH8/EX8.12/Ex8_12.sce b/1445/CH8/EX8.12/Ex8_12.sce
index 364e96eaf..11e8f4315 100644
--- a/1445/CH8/EX8.12/Ex8_12.sce
+++ b/1445/CH8/EX8.12/Ex8_12.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 12
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 12");
-//4 pole wave wound 750 RPM shunt generator
//VARIABLE INITIALIZATION
P=4; //number of poles
N=750; //in rpm
@@ -16,13 +16,13 @@ r_l=10; //load resistance in Ohms
A=2; //for wave winding
//SOLUTION
-E_a=(phi*Z*N*P)/(60*A); //induced emf
-disp(sprintf("The induced emf is %.0f V",E_a));
+E_a=(phi*Z*N*P)/(60*A);
+disp(sprintf("The induced emf is %f V",E_a));
// E_a=v+(I_a*r_a) but I_a=I_l+I_f and I_l=v/r_l, I_f=v/r_f =>I_a=(v/r_l) + (v/r_f)
// =>E_a=v+(((v/r_l) + (v/r_f))*r_a)
// taking v common, the following equation is obtained
v=E_a/(1+(r_a/r_f)+(r_a/r_l));
-disp(sprintf("The terminal voltage of the machine is %.0f V",v));
+disp(sprintf("The terminal voltage of the machine is %f V",v));
//The answer is slightly different due to the precision of floating point numbers
diff --git a/1445/CH8/EX8.13/Ex8_13.sce b/1445/CH8/EX8.13/Ex8_13.sce
index 2e1e3d493..8512b6a9e 100644
--- a/1445/CH8/EX8.13/Ex8_13.sce
+++ b/1445/CH8/EX8.13/Ex8_13.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 13
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 13");
-//4 pole shunt generator
//VARIABLE INITIALIZATION
P=4; //number of poles
v_t=220; //in Volts
@@ -17,15 +17,15 @@ drop=1; //contact drop per brush
//solution (i)
A=P; //for lap winding
I_f=v_t/r_f; //I_f is same as I_sh
-I_a=I_l+I_f; //induced emf
+I_a=I_l+I_f;
I_c=I_a/A; //conductor current
disp(sprintf("The current in each conductor of the armature is %d A",I_c));
//solution (ii)
v_a=I_a*r_a; //armature voltage drop
v_b=2*drop; //brush drop
-emf=v_t+v_a+v_b; //total emf generated
-disp(sprintf("The total emf generated is %.1f V",emf));
+emf=v_t+v_a+v_b;
+disp(sprintf("The total emf generated is %f V",emf));
//END
diff --git a/1445/CH8/EX8.14/Ex8_14.sce b/1445/CH8/EX8.14/Ex8_14.sce
index f5d54ad55..f058c8954 100644
--- a/1445/CH8/EX8.14/Ex8_14.sce
+++ b/1445/CH8/EX8.14/Ex8_14.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 14
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 14");
-//shunt generator
//VARIABLE INITIALIZATION
v_t=220; //in Volts
I_l=196; //in Amperes
@@ -13,20 +13,20 @@ r_f=55; //shunt field ressitance in Ohms
eff=88/100; //efficiency
//SOLUTION
-p_o=v_t*I_l; //output power
+p_o=v_t*I_l;
p_i=p_o/eff; //electrical input
tot_loss=p_i-p_o;
-I_f=v_t/r_f; //field current
-I_a=I_l+I_f; //armature current
+I_f=v_t/r_f;
+I_a=I_l+I_f;
cu_loss=v_t*I_f; //shunt field copper loss
c_loss=cu_loss+s_loss; //constant loss
arm_loss=tot_loss-c_loss; //armature copper loss
-r_a=arm_loss/(I_a^2); //armature resistance
+r_a=arm_loss/(I_a^2);
disp(sprintf("The armature resistance is %f Ω",r_a));
//for maximum efficiency, armature loss = constant loss =>(I_a^2)*r_a=c_loss
I_a=sqrt(c_loss/r_a);
-disp(sprintf("The load current corresponding to maximum efficiency is %.1f A",I_a));
+disp(sprintf("The load current corresponding to maximum efficiency is %f A",I_a));
//END
diff --git a/1445/CH8/EX8.15/Ex8_15.sce b/1445/CH8/EX8.15/Ex8_15.sce
index f14132a94..e85f70db9 100644
--- a/1445/CH8/EX8.15/Ex8_15.sce
+++ b/1445/CH8/EX8.15/Ex8_15.sce
@@ -1,25 +1,25 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 15
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 15");
-//230 V DC shunt motor
//VARIABLE INITIALIZATION
v_t=230; //in Volts
I_a1=3.33; //in Amperes
N1=1000; //in rpm
r_a=0.3; //armature resistance in Ohms
r_f=160; //field resistance in Ohms
-I_l=40; //line current in Amperes
+I_l=40; //in Amperes
phi1=1; //in Wb (phi=1 is an assumption)
-phi2=(1-(4/100)); //in Wb (phi2=0.96 of phi1), as armature reaction reduces no load flux by 4%
+phi2=(1-(4/100)); //in Wb (phi2=0.96 of phi1)
//SOLUTION
//At no load
-E_a1=v_t-(I_a1*r_a); //counter emf
-I_f=v_t/r_f; //field current
+E_a1=v_t-(I_a1*r_a);
+I_f=v_t/r_f;
//At full load
I_a2=I_l-I_f;
diff --git a/1445/CH8/EX8.16/Ex8_16.sce b/1445/CH8/EX8.16/Ex8_16.sce
index 4ba0fd577..e21ca661a 100644
--- a/1445/CH8/EX8.16/Ex8_16.sce
+++ b/1445/CH8/EX8.16/Ex8_16.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 16
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 16");
-//4 pole 250 V shunt motor
//VARIABLE INITIALIZATION
v_t=250; //in Volts
P=4; //number of poles
@@ -19,26 +19,25 @@ rot_loss=300; //rotational loss in Watts
//SOLUTION
//solution (i)
-I_f=v_t/r_f; // field current
-I_a=I_l-I_f; //armature current
-E_a=v_t-(I_a*r_a); // induced emf
-N=(E_a*A*60)/(phi*Z*P); //RPM
-N=round(N); //to round off the value of N
+I_f=v_t/r_f;
+I_a=I_l-I_f;
+E_a=v_t-(I_a*r_a);
+N=(E_a*A*60)/(phi*Z*P);
+N=round(N); //to round off the value of N
disp(sprintf("(i) The speed is %d rpm",N));
-p_e=E_a*I_a; //electromagnetic power
-w=(2*%pi*N)/60; //speed in RPS
-T1=p_e/w; // Internal torque
-disp(sprintf("The internal torque developed is %.3f N-m",T1));
+p_e=E_a*I_a;
+w=(2*%pi*N)/60;
+T1=p_e/w;
+disp(sprintf("The internal torque developed is %f N-m",T1));
//solution (ii)
-//shaft power
-p_o=p_e-rot_loss; //power output
-disp(sprintf("(ii)The shaft power is %.0f W",p_o));
-T2=p_o/w; //shaft torque
-disp(sprintf("The shaft torque is %.2f N-m",T2));
-p_i=v_t*I_l; // power input
-eff=(p_o/p_i)*100; //efficiency
-disp(sprintf("The efficiency is %.2f %%",eff));
+p_o=p_e-rot_loss;
+disp(sprintf("(ii)The shaft power is %f W",p_o));
+T2=p_o/w;
+disp(sprintf("The shaft torque is %f N-m",T2));
+p_i=v_t*I_l;
+eff=(p_o/p_i)*100;
+disp(sprintf("The efficiency is %f %%",eff));
//END
diff --git a/1445/CH8/EX8.17/Ex8_17.sce b/1445/CH8/EX8.17/Ex8_17.sce
index 6e4141500..0ca2818cc 100644
--- a/1445/CH8/EX8.17/Ex8_17.sce
+++ b/1445/CH8/EX8.17/Ex8_17.sce
@@ -1,58 +1,45 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 17
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 17");
-//200 V DC shunt motor of 1000 rpm
//VARIABLE INITIALIZATION
v_t=200; //in Volts
-I_l=22; //line current in Amperes
+I_l=22; //in Amperes
N1=1000; //in rpm
-r_a=0.1; //armature resistancein Ohms
-r_f=100; //field resistance in Ohms
-N2=800; //new speed in rpm
+r_a=0.1; //in Ohms
+r_f=100; //in Ohms
+N2=800; //in rpm
//SOLUTION
//solution (i)
-//load torque is independent of speed, the torque is constant at both speeds
-//T dir prop phi1.Ia1 dir prop phi2.Ia2
-//Therefore we get
-//phi1.Ia1=phi2.Ia2 (since phi1=phi2)
-// or Ia1=Ia2
-I_f=v_t/r_f; // field current
-I_a1=I_l-I_f; // armature current
-E_a1=v_t-(I_a1*r_a); // counter emf
+I_f=v_t/r_f;
+I_a1=I_l-I_f;
+E_a1=v_t-(I_a1*r_a);
//on rearranging the equation E_a2:E_a1=N2:N1, where E_a2=v_t-I_a1*(r_a+r_s) and E_a1=v_t-(I_a1*r_a), we get,
r_s1=((v_t - ((N2*E_a1)/N1))/I_a1)-r_a;
-disp(sprintf("(i) When the load torque is independent of speed, the additional resistance is %.2f Ω",r_s1));
+disp(sprintf("(i) When the load torque is independent of speed, the additional resistance is %f Ω",r_s1));
//solution (ii)
-//Load torque Tl is proportional to N
-//But electromagnetic torque Te=k.phi.Ia
-//therefore,
-//k.phi1.Ia1 dir prop N1
-//k.phi2.Ia2 dir prop n2
-//hence we get (as phi1=phi2)
I_a2=(N2/N1)*I_a1;
//on rearranging the equation E_a2:E_a1=N2:N1, where E_a2=v_t-I_a2*(r_a+r_s) and E_a1=v_t-(I_a1*r_a), we get,
r_s2=((v_t - ((N2*E_a1)/N1))/I_a2)-r_a;
-disp(sprintf("(ii)When the load torque is proportional to speed, the additional resistance is %.1f Ω",r_s2));
+disp(sprintf("(ii)When the load torque is proportional to speed, the additional resistance is %f Ω",r_s2));
//solution (iii)
-//The load Torque Tl dir prop N^2 dir prop phi.Ia
I_a2=(N2^2/N1^2)*I_a1;
//on rearranging the equation E_a2:E_a1=N2:N1, where E_a2=v_t-I_a2*(r_a+r_s) and E_a1=v_t-(I_a1*r_a), we get,
r_s3=((v_t - ((N2*E_a1)/N1))/I_a2)-r_a;
-disp(sprintf("(iii)When the load torque varies as the square of speed, the additional resistance is %.2f Ω",r_s3));
+disp(sprintf("(iii)When the load torque varies as the square of speed, the additional resistance is %f Ω",r_s3));
//solution (iv)
-//The load Torque Tl dir prop N^3 dir prop phi.Ia
I_a2=(N2^3/N1^3)*I_a1;
//on rearranging the equation E_a2:E_a1=N2:N1, where E_a2=v_t-I_a2*(r_a+r_s) and E_a1=v_t-(I_a1*r_a), we get,
r_s4=((v_t - ((N2*E_a1)/N1))/I_a2)-r_a;
-disp(sprintf("(iv)When the load torque varies as the cube of speed, the additional resistance is %.2f Ω",r_s4));
+disp(sprintf("(iv)When the load torque varies as the cube of speed, the additional resistance is %f Ω",r_s4));
//END
diff --git a/1445/CH8/EX8.18/Ex8_18.sce b/1445/CH8/EX8.18/Ex8_18.sce
index 10b37b947..fb5a399e9 100644
--- a/1445/CH8/EX8.18/Ex8_18.sce
+++ b/1445/CH8/EX8.18/Ex8_18.sce
@@ -1,27 +1,27 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 18
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 18");
-//460 V 10 HP motor
//VARIABLE INITIALIZATION
v_t=460; //in Volts
p_o=10*736; //in Watts (1 metric H.P=735.5 W)
ratio=85/100; //as given in the question
-eff=84/100; // efficiency
+eff=84/100;
I_f=1.1; //in Amperes
r_a=0.2; //in Ohms
//SOLUTION
-p_i=p_o/eff; //power input
-I_l=p_i/v_t; //line current
-I_a=I_l-I_f; // armature current
-E1=v_t-(I_a*r_a); //back emf
+p_i=p_o/eff;
+I_l=p_i/v_t;
+I_a=I_l-I_f;
+E1=v_t-(I_a*r_a);
E2=E1*ratio; //E2:E1=N2:N1=ratio
v=v_t-E2; //voltage drop across r_a and r_s (r_s is the series resistance to be inserted)
-r_s=(v/I_a)-r_a; // series resistance
-disp(sprintf("The resistance required is %.2f Ω",r_s));
+r_s=(v/I_a)-r_a;
+disp(sprintf("The resistance required is %f Ω",r_s));
//The answer is different because ratio equals 85/100 and not 75/100
diff --git a/1445/CH8/EX8.19/Ex8_19.sce b/1445/CH8/EX8.19/Ex8_19.sce
index a7376d7e8..7d0ae5ed0 100644
--- a/1445/CH8/EX8.19/Ex8_19.sce
+++ b/1445/CH8/EX8.19/Ex8_19.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 19
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 19");
-//250 V DC shunt motor
//VARIABLE INITIALIZATION
v_t=250; //in Volts
r_a=0.5; //in Ohms
@@ -14,11 +14,7 @@ I=21; //in Amperes
r_s=250; //in Ohms
//SOLUTION
-//when torque is constant T dir prop phi.Ia = constant
-//assuming field is unsaturated , therefore,
-//If dir prop phi
-//therefore, If1.Ia1=If2.Ia2
-I_f1=v_t/r_f; //
+I_f1=v_t/r_f;
I_f2=v_t/(r_f+r_s);
I_a1=I-I_f1;
// T is directly proportional to (Φ*I_a)
@@ -32,6 +28,6 @@ E_b2=v_t-(I_a2*r_a);
// =>E_b1:E_b2=(I_f1:I_f2)*(N1:N2)
N2=(I_f1/I_f2)*(E_b2/E_b1)*N1;
N2=round(N2); //to round off the value
-disp(sprintf("The new speed of the motor is %.d rpm",N2));
+disp(sprintf("The new speed of the motor is %d rpm",N2));
//END
diff --git a/1445/CH8/EX8.2/Ex8_2.sce b/1445/CH8/EX8.2/Ex8_2.sce
index 0046becf5..199e2e038 100644
--- a/1445/CH8/EX8.2/Ex8_2.sce
+++ b/1445/CH8/EX8.2/Ex8_2.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 2
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 2");
-// 230 V DC shunt machine
//VARIABLE INITIALZATION
v_t=230; //terminal voltage in Volts
r_a=0.5; //armature resistance in Ohms
@@ -14,17 +14,17 @@ I_l=40; //line current in Amperes
//SOLUTION
//for generator
-I_f=v_t/r_f; //current through the shunt field winding
-I_a=I_l+I_f; //Armature Current
-E_a=v_t+(I_a*r_a); //E_a=emf of generator
+I_f=v_t/r_f;
+I_a=I_l+I_f;
+E_a=v_t+(I_a*r_a); //here E_a=emf of generator
//for motor
I_f=v_t/r_f;
I_a=I_l-I_f;
-E_b=v_t-(I_a*r_a); //E_b=emf of motor
-//ratio of speed as generator to speed as motor
+E_b=v_t-(I_a*r_a); //here E_b=emf of motor
+
ratio=E_a/E_b; //E_a:E_b=(k_a*flux*N_g):(k_a*flux*N_m) =>E_a:E_b=N_g:N_m (as flux is constant)
-disp(sprintf("The ratio of speed as a generator to the speed as a motor is %.3f",ratio));
+disp(sprintf("The ratio of speed as a generator to the speed as a motor i.e. N_g:N_m is %f",ratio));
//END
diff --git a/1445/CH8/EX8.20/Ex8_20.sce b/1445/CH8/EX8.20/Ex8_20.sce
index a81f6f77c..f3dd44d86 100644
--- a/1445/CH8/EX8.20/Ex8_20.sce
+++ b/1445/CH8/EX8.20/Ex8_20.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 20
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 20");
-//250 V DC shunt motor
//VARIABLE INITIALIZATION
v_t=250; //in Volts
I_a1=20; //in Amperes
@@ -15,35 +15,11 @@ ratio=1.5; //N2:N1=1.5
phi1=1; //it is an assumption
//SOLUTION
-// equations have been renumbered differently than in the text book for better clarity
-// Torque is constant
-// T dir prop phi.Ia
-// phi1.ia1=phi2.Ia2 (eq 1)
-//similarly, E dir prop phi.N
-//E1/E2 = phi1.n1/phi2.n2
E_1=v_t-(I_a1*r_a)-(2*drop);
-//speed raised by 50%. new speed 1.5 times the old one i.e n2=1.5N1
-//
-//E1/E2 = Phi1.N1/phi2.N2 (eq 2)
-//from eq 2
-//=>E1/E2=Phi1/1.5.phi2 (substituting N2=1.5N1) (eq 3)
-//=>phi2/phi1=E2/1.5.E1 (eq 4)
-//from eq 1
-//phi2/ph1=Ia2/Ia2=20/Ia2 -------------------(eq 5)
-//substituting value of phi2/phi1 in eq 4 we get
-//20/Ia2=E2/1.5E1
-//=>E1/E2=Ia2/30 (eq 6)
-//further we know that
-//E2=V-Ia2.Ra -2.drop where V=v_t=250, ra=R_a=0.5 and drop=1
-//=>E2=(V-2.drop) -Ra.Ia2 (eq 7)
-//substituting value of E2 in eq 6, we get
-//E1/[(V-2.drop)-ra.Ia2] = Ia2/30 (eq 8)
-// we get quadratic equation
-//Setting in an quadratic equation of type a.X^2 + b.X + c = 0
-//The constants are as given below:
-a=1; // coefficient of Ia2^2
-b=-496; //coefficient of Ia2, = (V-2.drop).Ra=(v_t-2.drop).R_a
-c=14280; // constant = E_1*30
+//solving the quadratic equation directly,
+a=1;
+b=-496;
+c=14280;
D=b^2-(4*a*c);
x1=(-b+sqrt(D))/(2*a);
x2=(-b-sqrt(D))/(2*a);
@@ -54,6 +30,6 @@ I_a2=x2;
end;
phi2=(I_a1/I_a2)*phi1;
phi=(1-phi2)*100;
-disp(sprintf("The flux to be reduced is %.1f %% of the main flux",phi));
+disp(sprintf("The flux to be reduced is %f %% of the main flux",phi));
//END
diff --git a/1445/CH8/EX8.21/Ex8_21.sce b/1445/CH8/EX8.21/Ex8_21.sce
index cd3275d33..c4e839f94 100644
--- a/1445/CH8/EX8.21/Ex8_21.sce
+++ b/1445/CH8/EX8.21/Ex8_21.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 21
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 21");
-//10kW 6 pole DC generator
//VARIABLE INITIALIZATION
p_o=10*1000; //in Watts
P=6; //number of poles
@@ -16,25 +16,22 @@ l=0.25; //length of armature in m
dia=0.2; //diameter of armature in m
//SOLUTION
+
//solution (a)
-//pole pitch is defined as the periphery of armature divided by the number of poles or the area of armature between two adjacent poles
-//area of armature = 2.pi. dia of armature. length of armature
-area=2*%pi*(dia/2)*l; //area of armature
-phi=B*area; //flux density over one pitch pole= flux per pole/area of armature between poles
-disp(sprintf("(a) The flux per pole is %.4f Wb",phi));
+area=2*%pi*(dia/2)*l;
+phi=B*area;
+disp(sprintf("(a) The flux per pole is %f Wb",phi));
//solution (b)
-Z=(60*E_g)/(phi*N); // no of conductors in the armature
- //induced emf = phi.Z.N.P/60.A
- // = phi.Z.N/60 ( as A=P)
+Z=(60*E_g)/(phi*N);
disp(sprintf("(b) The total number of active conductors is %d",Z));
//solution (c)
-I_a=50; // armature current
-p=E_g*I_a; //power developed
-w=(2*%pi*N)/60; //speed in RPS
-T=p/w; //Torque
-disp(sprintf("(c) The torque developed when armature current is 50 A is %.2f N-m",T));
+I_a=50;
+p=E_g*I_a;
+w=(2*%pi*N)/60;
+T=p/w;
+disp(sprintf("(c) The torque developed when armature current is 50 A is %f N-m",T));
//END
diff --git a/1445/CH8/EX8.22/Ex8_22.sce b/1445/CH8/EX8.22/Ex8_22.sce
index 7a554a6c8..5adaef446 100644
--- a/1445/CH8/EX8.22/Ex8_22.sce
+++ b/1445/CH8/EX8.22/Ex8_22.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 22
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 22");
-//230 V 600 rpm shunt motor
//VARIABLE INITIALIZATION
N1=600; //in rpm
v=230; //in Volts
@@ -16,12 +16,12 @@ drop=2; //brush drop in Volts
//SOLUTION
//solution (i)
-I_l2=5; // no load current
-I_a1=I_l1-(v/r_f); // armature current
-E_b1=v-(I_a1*r_a)-drop; // back emf
+I_l2=5;
+I_a1=I_l1-(v/r_f);
+E_b1=v-(I_a1*r_a)-drop;
I_a2=I_l2-(v/r_f);
E_b2=v-(I_a2*r_a)-drop;
-N2=(E_b2/E_b1)*N1; // speed at no load
+N2=(E_b2/E_b1)*N1;
N2=round(N2);
disp(sprintf("(i) The speed at no load is %d rpm",N2));
@@ -32,17 +32,16 @@ E_b2=(N2/N1)*E_b1;
dif=v-drop; //difference
I_a2=I_l2-(v/r_f);
r_se=((dif-E_b2)/I_a2)-r_a;
-disp(sprintf("(ii) The additional resistance is %.3f Ω",r_se));
+disp(sprintf("(ii) The additional resistance is %f Ω",r_se));
//solution (iii)
-//Eb1/Eb2 = phi2.N2/Phi1.N1
phi1=1; //it is an assumption
I_a3=30;
N2=750;
E_b3=v-(I_a3*r_a)-drop;
phi2=(E_b3/E_b1)*(N1/N2)*phi1;
red=((1-phi2)*100*phi1)/phi1;
-disp(sprintf("(iii) The percentage reduction of flux per pole is %.1f %%",red));
+disp(sprintf("(iii) The percentage reduction of flux per pole is %f %%",red));
//END
diff --git a/1445/CH8/EX8.23/Ex8_23.sce b/1445/CH8/EX8.23/Ex8_23.sce
index 0f93e5d8a..d2b3190a8 100644
--- a/1445/CH8/EX8.23/Ex8_23.sce
+++ b/1445/CH8/EX8.23/Ex8_23.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 23
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 23");
-//230 V DC shunt motor
//VARIABLE INITIALIZATION
v=230; //in Volts
r_a=0.4; //in Ohms
@@ -14,23 +14,13 @@ N1=800; //in rpm
N2=1000; //in rpm
//SOLUTION
-//Eb1/Eb2 = phi1.N1/phi2.N2 (eq 1)
-//Eb=Vt - Ia.Ra (eq 2)
-//=> (Vt-Ia1.Ra)/(Vt-Ia2.Ra) = phi1.N1/phi2.N2 (eq 3)
-I_f1=v/r_f1; //redundant step
-E_b1=v-(I_a*r_a); // back emf
-//Since terminal voltage Vt is constant, if dir prop phi dir prop 1/r_f
-//=> phi1/phi2 = r_f2/r_f1 (eq 4) [r_f2 = field resistance at 10000 rpm]
- //[r_f1 = field resistance at 800 rpm]
-//Load torque is constant, so T dir prop phi.Ia
-//=> phi1.Ia1=phi2.Ia2
-//=> Ia2=(phi1/phi2). Ia1 (eq 5)
-//putting the value of Ia2 in eq 3 and
+I_f1=v/r_f1;
+E_b1=v-(I_a*r_a);
//rearranging the equation, we get,
r_f2=((E_b1*N2)/((v*N1)-(N1*I_a*r_a)))*r_f1;
r_f2_dash=r_f2-r_f1;
-disp(sprintf("The external resistance is %.2f Ω",r_f2_dash));//text book answer is 29.93 ohm
+disp(sprintf("The external resistance is %f Ω",r_f2_dash));
//The answer is slightly different due to the precision of floating point numbers
-//END
+//END \ No newline at end of file
diff --git a/1445/CH8/EX8.24/Ex8_24.sce b/1445/CH8/EX8.24/Ex8_24.sce
index e330f4a03..9d32d73c5 100644
--- a/1445/CH8/EX8.24/Ex8_24.sce
+++ b/1445/CH8/EX8.24/Ex8_24.sce
@@ -1,6 +1,7 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 24
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 24");
diff --git a/1445/CH8/EX8.25/Ex8_25.sce b/1445/CH8/EX8.25/Ex8_25.sce
index a9088f41b..adf7f1898 100644
--- a/1445/CH8/EX8.25/Ex8_25.sce
+++ b/1445/CH8/EX8.25/Ex8_25.sce
@@ -1,10 +1,11 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 25
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 25");
-//24 slot 2 pole DC machine with 18 turns per coil
+
//VARIABLE INITIALIZATION
slot=24; //number of slots
P=2; //number of poles
@@ -15,28 +16,28 @@ rad=10/100; //radius in meters
w=183.2; //angular velocity in rad/s
//SOLUTION
-A=2; // number of parallel paths
+A=2;
Z=slot*P*N; //total number of conductors
-ar1=(2*%pi*rad*l)/P; // actual pole area
+ar1=(2*%pi*rad*l)/P;
ar2=ar1*0.8; //since the magnetic poles 80% of the armature periphery
phi=B*ar2; //effective flux per pole
//solution (a)
E_a=(P*Z*phi*w)/(2*%pi*A);
-disp(sprintf("(a) The induced emf is %.1f V",E_a));
+disp(sprintf("(a) The induced emf is %f V",E_a));
//solution (b)
-coil=slot/P; //number of coils in each path = slots/path
-E_coil=E_a/coil; //induced emf per coil
-disp(sprintf("(b) The induced emf per coil is %.2f V",E_coil));
+coil=slot/P; //number of coils in each path
+E_coil=E_a/coil;
+disp(sprintf("(b) The induced emf per coil is %f V",E_coil));
//solution (c)
-E_turn=E_coil/N; //emf induced per turn
-disp(sprintf("(c) The induced emf per turn is %.2f V",E_turn));
+E_turn=E_coil/N;
+disp(sprintf("(c) The induced emf per turn is %f V",E_turn));
//solution (d)
-E_cond=E_turn/A; // emf induced per conductor
-disp(sprintf("(d) The induced emf per conductor is %.3f V",E_cond));
+E_cond=E_turn/A;
+disp(sprintf("(d) The induced emf per conductor is %f V",E_cond));
//The answers are slightly different due to the precision of floating point numbers
diff --git a/1445/CH8/EX8.27/Ex8_27.sce b/1445/CH8/EX8.27/Ex8_27.sce
index e6422663f..7dbf5ed65 100644
--- a/1445/CH8/EX8.27/Ex8_27.sce
+++ b/1445/CH8/EX8.27/Ex8_27.sce
@@ -1,10 +1,11 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 27
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 27");
-//DC series motor, 200V DC motor
+
//VARIABLE INITIALIZATION
v_t=200; //in volts
r_a=0.06; //in Ohms
@@ -14,13 +15,12 @@ p_i=20*1000; //in Watts
//SOLUTION
//solution (a)
-//Il=Ia=Ise= Pinput/Vt
-I_a=p_i/v_t; // armature current
-E_b=v_t-I_a*(r_a+r_se); // back emf
+I_a=p_i/v_t;
+E_b=v_t-I_a*(r_a+r_se);
disp(sprintf("(a) The counter emf of the motor is %d V",E_b));
//solution (b)
-p_a=E_b*I_a; // power developed in armature
+p_a=E_b*I_a;
p_a=p_a/1000; //from W to kW
disp(sprintf("(b) The power developed in the armature is %d kW",p_a));
diff --git a/1445/CH8/EX8.28/Ex8_28.sce b/1445/CH8/EX8.28/Ex8_28.sce
index 8cc1c1c85..8c16f6f17 100644
--- a/1445/CH8/EX8.28/Ex8_28.sce
+++ b/1445/CH8/EX8.28/Ex8_28.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 28
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 28");
-//series generator
//VARIABLE INITIALIZATION
E_a=120; //in Volts
r_se=0.03; //in Ohms
@@ -14,9 +14,8 @@ r=0.25; //in Ohms
I=300; //in Amperes
//SOLUTION
-v=I*(r_se+r_a+r); // voltage drop across Rse and ra and feeder
+v=I*(r_se+r_a+r);
disp(sprintf("The voltage drop across the three resistances is %d V",v));
-//hence the voltage between far end and bus bar is:
v_t=v1+E_a-v;
disp(sprintf("The voltage between far end and the bus bar is %d V",v_t));
disp(sprintf("The net increase of %d V may be beyond the desired limit",v_t-v1));
diff --git a/1445/CH8/EX8.29/Ex8_29.sce b/1445/CH8/EX8.29/Ex8_29.sce
index 06477777a..c3d90c0d3 100644
--- a/1445/CH8/EX8.29/Ex8_29.sce
+++ b/1445/CH8/EX8.29/Ex8_29.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 29
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 29");
-//DC series motor
//VARIABLE INITIALIZATION
r_a=1; //in Ohms
N1=800; //in rpm
@@ -13,9 +13,9 @@ I_a=15; //in Amperes
r_s=5; //series resistance in Ohms
//SOLUTION
-E_b1=v_t-(I_a*r_a); // back emf
+E_b1=v_t-(I_a*r_a);
E_b2=v_t-I_a*(r_a+r_s);
-N2=(E_b2/E_b1)*N1; //RPM
+N2=(E_b2/E_b1)*N1;
N2=round(N2); //to round off the value
disp(sprintf("The speed attained after connecting the series resistance is %d rpm",N2));
diff --git a/1445/CH8/EX8.3/Ex8_3.sce b/1445/CH8/EX8.3/Ex8_3.sce
index b08092d94..9793e5176 100644
--- a/1445/CH8/EX8.3/Ex8_3.sce
+++ b/1445/CH8/EX8.3/Ex8_3.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 3
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 3");
-//10 kW 250 V DC shunt generator
//VARIABLE INITIALIZATION
p_o=10*1000; //output of generator in Watts
v_t=250; //terminal voltage in Volts
@@ -16,15 +16,15 @@ rot_loss=540; //rotational loss in Watts
//SOLUTION
//solution (i)
-I_l=p_o/v_t; //line current
-I_a=I_l+I_f; // armature current
-E_a=v_t+(I_a*r_a); //E_a=emf of generator
-disp(sprintf("(i) The armature induced emf is %.2f V",E_a));
+I_l=p_o/v_t;
+I_a=I_l+I_f;
+E_a=v_t+(I_a*r_a);
+disp(sprintf("(i) The armature induced emf is %f V",E_a));
//solution (ii)
w=(2*%pi*N)/60; //in radian/sec
T_e=(E_a*I_a)/w;
-disp(sprintf("(ii) The torque developed is %.2f N-m",T_e));
+disp(sprintf("(ii) The torque developed is %f N-m",T_e));
//solution (iii)
arm_loss=(I_a^2)*r_a; //armature loss
@@ -32,7 +32,7 @@ fld_loss=v_t*I_f; //field loss
tot_loss=rot_loss+arm_loss+fld_loss;
p_i=p_o+tot_loss;
eff=(p_o/p_i)*100;
-disp(sprintf("(iii) The efficiency is %.3f %%",eff));
+disp(sprintf("(iii) The efficiency is %f %%",eff));
//END
diff --git a/1445/CH8/EX8.30/Ex8_30.sce b/1445/CH8/EX8.30/Ex8_30.sce
index 782ad08af..caf18e709 100644
--- a/1445/CH8/EX8.30/Ex8_30.sce
+++ b/1445/CH8/EX8.30/Ex8_30.sce
@@ -1,25 +1,20 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 30
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 30");
-//Series DC motor 5 HP with 100 rpm
//VARIABLE INITIALIZATION
p=5*735.5; //in Watts (1 metric H.P.=735.5 W)
-N=1000; //in rpm, given as 100 rpm but solved as 1000 rpm in the text book
- //hence taken 1000 rpm
+N=1000; //in rpm
I=30; //in Amperes
I_s=45; //starting current in Amperes
//SOLUTION
-T=(p*60)/(2*%pi*1000); // Torque
-//Torque dir prop phi.Ia
-//=> since phi dir prop Ia
-//=> torque dir prop Ia^2
-// starting torque T_s / T = Starting current Ia ^2 / I^2
+T=(p*60)/(2*%pi*1000);
T_s=(T*(I_s^2))/(I^2);
-disp(sprintf("The starting torque is %.0f N-m",T_s));
+disp(sprintf("The starting torque is %f N-m",T_s));
//The answer is slightly different due to precision of floating point numbers
diff --git a/1445/CH8/EX8.31/Ex8_31.sce b/1445/CH8/EX8.31/Ex8_31.sce
index 5e8349ca2..39123e25d 100644
--- a/1445/CH8/EX8.31/Ex8_31.sce
+++ b/1445/CH8/EX8.31/Ex8_31.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 31
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 31");
-//series motor
//VARIABLE INITIALIZATION
r_a=0.1; //combined resistance of armature & field resistance in Ohms
v_t=230; //in Volts
@@ -14,13 +14,6 @@ I_a2=200; //in Amperes
ratio=1.2; //ratio of Φ2:Φ1=1.2
//SOLUTION
-//Eb1 dir prop phi1.N1
-//Eb1=Vt-Ia1.Ra
-//=> (Vt-Ia1.Ra) dir prop ph1.N1
-//and
-//=> (Vt-Ia2.Ra) dir prop ph1.N2
-//=> (Vt-Ia1.Ra)/ (Vt-Ia1.Ra) = phi1.N1/phi2.N2
-//given Phi2=1.2 Phi1 as flux is increased by 20%
E_b1=v_t-(I_a1*r_a); //numerator of LHS according to the book
E_b2=v_t-(I_a2*r_a); //denominator of LHS according to the book
N2=(E_b2/E_b1)*(1/ratio)*N1;
diff --git a/1445/CH8/EX8.32/Ex8_32.sce b/1445/CH8/EX8.32/Ex8_32.sce
index ff37b6767..957557827 100644
--- a/1445/CH8/EX8.32/Ex8_32.sce
+++ b/1445/CH8/EX8.32/Ex8_32.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 32
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 32");
-//250 V series motor at 1000 rpm
//VARIABLE INITIALIZATION
v_t=250; //in Volts
I=20; //in Amperes
@@ -15,36 +15,17 @@ r_a=0.2; //in Ohms
//SOLUTION
-r_se=P*r_p; // series field resistance
+r_se=P*r_p;
r_m=r_a+r_se; //resistance of motor
-E_b1=v_t-(I*r_m); // back emf
-//Torque t1 dir prop phi1.Ia
-//=> since phi dir prop Ia
-//=> torque dir prop Ia^2
-T1=I^2; // torque
+E_b1=v_t-(I*r_m);
+T1=I^2;
//solution (a)
-//10 ohm resistance in parallel with armature
-//let I be input currnet then, drop in series field = r_a.I
-//Voltage across the terminals = V = Vt-r_a.I
-//=> current in 10 ohm resistance (=r) = (Vt-r_a.I)/r (eq 1)
-// now, Armature current Ia
-// Ia= I - (Vt-r_a.I)/r (eq 2)
-//Torque developed t2 dir prop phi2.Ia
-//=> since phi dir prop I
-//=> torque dir prop I.Ia
-//However, T2=T1, as torque developed in two cases is equal
-//=> I.Ia = T1
-//substituting value of Ia from eq 2, we get
-//I.(I - (Vt-r_a.I)/r) =T1
-//=>I. (I.r+r_a.I -Vt)/r = T1
-//=> (r+r_a).I^2 -Vt.I =T1.r
-//=> (r+r_a).I^2 -Vt.I - T1.r =0
//solving the quadratic equation directly,
r=10; //in Ohms
-a=10.2; //(r+r_a). value 1.02 in text book, as it was divided by r=10
-b=-250; //Vt ; -25 in text book, as it was divided by r=10
-c=-4000; // T1.r; 400 in text book, as it was not multiplied by r=10
+a=1.02;
+b=-25;
+c=-400;
D=b^2-(4*a*c);
x1=(-b+sqrt(D))/(2*a);
x2=(-b-sqrt(D))/(2*a);
@@ -54,23 +35,14 @@ I1=x1;
else (x1<0 & x2>0)
I1=x2;
end;
-I_a=((10.2*I1)-v_t)/r; // armature current
-E_b2=v_t-(I_a*r_a); // back emf
+I_a=((10.2*I1)-v_t)/r;
+E_b2=v_t-(I_a*r_a);
N2=((E_b2/E_b1)*I*N1)/I1;
N2=round(N2); //to round off the value
disp(sprintf("(a) The speed with 10 Ω resistance in parallel with the armature is %d rpm",N2));
//solution (b)
-//0.5 ohmic diverter resistance
-//resistance in the field winding = 0.5/(0.5+r_a)
-// since r_a=0.2,the value becomes 0.5/0.7 = 5/7
-//Torque T3 dir prop phi3.Ia
-// => dir prop 5/7 . I. I.
-//=> dir prop 5/7 I^2
-//since T3=T1
-//=> 5/7 I^2= T1
-//=> 5/7. I^2 - T1=0
-//solving the quadratic equation directly,with new values
+//solving the quadratic equation directly,
a=5/7;
b=0;
c=-400;
@@ -83,7 +55,7 @@ I2=y1;
else (y1<0 & y2>0)
I2=y2;
end;
-E_b3=v_t-(I2*r_a); // back emf
+E_b3=v_t-(I2*r_a);
N3=((E_b3/E_b1)*I*N1)/(I2*a);
N3=round(N3); //to round off the value
disp(sprintf("(b) The speed with 0.5 Ω resistance in parallel with series field is %d rpm",N3));
diff --git a/1445/CH8/EX8.33/Ex8_33.sce b/1445/CH8/EX8.33/Ex8_33.sce
index aaf8cdd40..9e16a1081 100644
--- a/1445/CH8/EX8.33/Ex8_33.sce
+++ b/1445/CH8/EX8.33/Ex8_33.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 33
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 33");
-//230 V DC series motor
//VARIABLE INITIALIZATION
v_t=230; //in Volts
N1=1500; //in rpm
@@ -15,34 +15,17 @@ r_se=0.2; //series field resistance in Ohms
//SOLUTION
//solution (a)
-//for series motors, phi dir prop Ia
-// therefore, Te dir prop Ia^2
-// at starting Eb=0 and Vt= Ia1.(r_a+r_se+r_ext)
-//rearranging for r_ext, we get
-// r_ext = (Vt-Ia1.(r_a+r_se))/ Ia1
-E_b=0; //back emf at starting
-nr1=v_t-I_a1*(r_a+r_se); //value of numerator in the expression for r_ext
+E_b=0; //at starting
+nr1=v_t-I_a1*(r_a+r_se); //value of numerator
r_ext=nr1/I_a1;
-disp(sprintf("(a) At starting, the resistance that must be added is %.0f Ω",r_ext));
+disp(sprintf("(a) At starting, the resistance that must be added is %f Ω",r_ext));
//solution (b)
-//Ia2=Ia1=20 A
-//as phi dir prop Ia, we get
-//Eb2/Eb1 = phi2.n2/ phi1. N1 = Ia2.N2/Ia1.N1
-//=> Eb2/Eb1=N2/N1 as Ia2=Ia1 (eq 1)
I_a2=I_a1;
N2=1000;
ratio=N2/N1;
-// now, we know that Eb1=Vt-Ia1.(r_a+r_se) and
-// Eb2 = Vt - Ia2.(r_a+r_se+r_ext)
-//substituting values of Eb1 and Eb2 in eq 1 above, we get
-//n2/n1 = (Vt - Ia2.(r_a+r_se+r_ext))/ (Vt-Ia1.(r_a+r_se))
-//since ia1=Ia2 (rated torque)
-//we get
-//r_ext = (N2/N1).(v_t-I_a1*(r_a+r_se))/Ia2 -(v_t-I_a2*(r_a+r_se))/Ia2
-//
nr2=v_t-I_a2*(r_a+r_se);
r_ext=((ratio*nr1)-nr2)/(-I_a2);
-disp(sprintf("(b) At 1000 rpm, the resistance that must be added is %.3f Ω",r_ext));
+disp(sprintf("(b) At 1000 rpm, the resistance that must be added is %f Ω",r_ext));
//END
diff --git a/1445/CH8/EX8.34/Ex8_34.sce b/1445/CH8/EX8.34/Ex8_34.sce
index 00c7d76f7..da2ba5873 100644
--- a/1445/CH8/EX8.34/Ex8_34.sce
+++ b/1445/CH8/EX8.34/Ex8_34.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 34
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 34");
-//COMPOUND MACHINE
//VARIABLE INITIALIZATION
r_a=0.06; //armature resistance in Ohms
r_se=0.04; //series resistance in Ohms
@@ -15,17 +15,17 @@ I_l=100; //in Amperes
//SOLUTION
//solution (a)
-I_sh=v_t/r_sh; // shunt current
-I_a=I_sh+I_l; // armature current
-E_g=v_t+I_a*(r_a+r_se); // emf generated
+I_sh=v_t/r_sh;
+I_a=I_sh+I_l;
+E_g=v_t+I_a*(r_a+r_se);
disp("(a) When the machine is connected as long shunt compound generator-");
-disp(sprintf("The armature current is %f A and the total emf is %.2f V",I_a,E_g));
+disp(sprintf("The armature current is %f A and the total emf is %f V",I_a,E_g));
//solution (b)
I_sh=(v_t/r_sh)+(I_l*r_se/r_sh);
I_a=I_sh+I_l;
E_g=v_t+(I_a*r_a)+(I_l*r_se);
disp("(b) When the machine is connected as short shunt compound generator-");
-disp(sprintf("The armature current is %f A and the total emf is %.1f V",I_a,E_g));
+disp(sprintf("The armature current is %f A and the total emf is %f V",I_a,E_g));
//END
diff --git a/1445/CH8/EX8.35/Ex8_35.sce b/1445/CH8/EX8.35/Ex8_35.sce
index fcf1b5461..4fd8470a8 100644
--- a/1445/CH8/EX8.35/Ex8_35.sce
+++ b/1445/CH8/EX8.35/Ex8_35.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 35
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 35");
-//Exercise 34, motor working as DC motor
//VARIABLE INITIALIZATION
r_a=0.06; //armature resistance in Ohms
r_se=0.04; //series resistance in Ohms
@@ -15,17 +15,17 @@ I_l=100; //in Amperes
//SOLUTION
//solution (a)
-I_sh=v_t/r_sh; // shunt current
-I_a=I_l-I_sh; // armature current
-E_g=v_t-I_a*(r_a+r_se); // generated emf
+I_sh=v_t/r_sh;
+I_a=I_l-I_sh;
+E_g=v_t-I_a*(r_a+r_se);
disp("(a) When the machine is connected as long shunt compound generator-");
-disp(sprintf("The armature current is %f A and the total emf is %.1f V",I_a,E_g));
+disp(sprintf("The armature current is %f A and the total emf is %f V",I_a,E_g));
//solution (b)
I_sh=(v_t/r_sh)-(I_l*r_se/r_sh);
I_a=I_l-I_sh;
E_g=v_t-(I_a*r_a)-(I_l*r_se);
disp("(b) When the machine is connected as short shunt compound generator-");
-disp(sprintf("The armature current is %f A and the total emf is %.2f V",I_a,E_g));
+disp(sprintf("The armature current is %f A and the total emf is %f V",I_a,E_g));
//END
diff --git a/1445/CH8/EX8.36/Ex8_36.sce b/1445/CH8/EX8.36/Ex8_36.sce
index 6ea9e53b5..842d723de 100644
--- a/1445/CH8/EX8.36/Ex8_36.sce
+++ b/1445/CH8/EX8.36/Ex8_36.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 36
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 36");
-//250 long shunt compound generator
//VARIABLE INITIALIZATION
v_t=250; //in Volts
I_l=150; //in Amperes
@@ -18,20 +18,20 @@ r_ip=0.02; //interpole resistance in Ohms
//SOLUTION
//solution (a)
-p_o=v_t*I_l; // power output
-I_sh=v_t/r_sh; // shunt current
-I_a=I_l+I_sh; // armature current
-r_tot=r_b+r_se+r_ip; // total armature circuit resistance
+p_o=v_t*I_l;
+I_sh=v_t/r_sh;
+I_a=I_l+I_sh;
+r_tot=r_b+r_se+r_ip;
arm_loss=(I_a^2)*r_tot; //armature circuit copper loss
cu_loss=v_t*I_sh; //shunt field copper loss
c_loss=cu_loss+loss1+loss2; //constant loss
-disp(sprintf("(a) The constant loss is %.0f W",c_loss));
+disp(sprintf("(a) The constant loss is %f W",c_loss));
//solution (b)
tot_loss=arm_loss+c_loss; //total loss
-p_i=p_o+tot_loss; // power input
-eff=(p_o/p_i)*100; // efficiency
-disp(sprintf("(b) The full load efficiency is %.0f %%",eff));
+p_i=p_o+tot_loss;
+eff=(p_o/p_i)*100;
+disp(sprintf("(b) The full load efficiency is %f %%",eff));
//END
diff --git a/1445/CH8/EX8.37/Ex8_37.sce b/1445/CH8/EX8.37/Ex8_37.sce
index 7cadef348..df3f4d6b1 100644
--- a/1445/CH8/EX8.37/Ex8_37.sce
+++ b/1445/CH8/EX8.37/Ex8_37.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 37
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 37");
-//250 V DC machine
//VARIABLE INITIALIZATION
p_o=50*1000; //in Watts
v_t=250; //in Volts
diff --git a/1445/CH8/EX8.38/Ex8_38.sce b/1445/CH8/EX8.38/Ex8_38.sce
index ce64d0ef1..15802d568 100644
--- a/1445/CH8/EX8.38/Ex8_38.sce
+++ b/1445/CH8/EX8.38/Ex8_38.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 38
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 38");
-//215 V DC machine supplying 5kW at 1000 rpm
//VARIABLE INITIALIZATION
v_t=215; //in Volts
r_a=0.4; //in Ohms
@@ -15,13 +15,13 @@ ratio=1.1; //according to the solution, Φ_b:Φ_a=1.1
//SOLUTION
//As generator
-I_ag=p/v_t; // as generator induced current
-E_a=v_t+(I_ag*r_a); // induced emf
+I_ag=p/v_t;
+E_a=v_t+(I_ag*r_a);
//As motor
-I_am=p/v_t; // current as motor
-E_b=v_t-(I_am*r_a); // back emf
-N_m=(1/ratio)*N_g*(E_b/E_a); // speed of machine
+I_am=p/v_t;
+E_b=v_t-(I_am*r_a);
+N_m=(1/ratio)*N_g*(E_b/E_a);
N_m=round(N_m); //to round off the value
disp(sprintf("The speed of the machine as motor is %d rpm",N_m));
diff --git a/1445/CH8/EX8.4/Ex8_4.sce b/1445/CH8/EX8.4/Ex8_4.sce
index afdaa2c0a..fbcb1d1b4 100644
--- a/1445/CH8/EX8.4/Ex8_4.sce
+++ b/1445/CH8/EX8.4/Ex8_4.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 4
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 4");
-//240 Volt Shunt Generator
//VARIABLE INITIALIZATION
v_t=240; //in Volts
I_l=200; //full load current in Amperes
@@ -17,19 +17,19 @@ s_loss=800; //stray(iron + friction) loss in Watts
//solution (a)
p_o=v_t*I_l; //output
eff=eff/100;
-p_i=p_o/eff; //input
+p_i=p_o/eff;
tot_loss=p_i-p_o; //since input=output+loss
-I_f=v_t/r_f; //field current
-I_a=I_l+I_f; //armature current
+I_f=v_t/r_f;
+I_a=I_l+I_f;
cu_loss=(I_f^2)*r_f; //copper loss
c_loss=cu_loss+s_loss; //constant loss
arm_loss=tot_loss-c_loss; //armature loss ((I_a^2)*r_a)
-r_a=arm_loss/(I_a^2); //armature resistance
-disp(sprintf("(a) The armature resisatnce is %.4f Ω",r_a));
+r_a=arm_loss/(I_a^2);
+disp(sprintf("(a) The armature resisatnce is %f Ω",r_a));
//solution (b)
//for maximum efficiency, armature loss = constant loss =>(I_a^2)*r_a=c_loss
I_a=sqrt(c_loss/r_a);
-disp(sprintf("(b) The load current corresponding to maximum efficiency is %.1f A",I_a));
+disp(sprintf("(b) The load current corresponding to maximum efficiency is %f A",I_a));
//END
diff --git a/1445/CH8/EX8.5/Ex8_5.sce b/1445/CH8/EX8.5/Ex8_5.sce
index 52b22ec32..8ced4b2f2 100644
--- a/1445/CH8/EX8.5/Ex8_5.sce
+++ b/1445/CH8/EX8.5/Ex8_5.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 5
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 5");
-//200 V shunt generator
//VARIABLE INITIALIZATION
v_t=200; //in Volts
I_l=50; //in Amperes
@@ -15,12 +15,10 @@ s_loss=500; //core and iron loss in Watts
//SOLUTION
//solution (a)
-//Shunt field current, Armature current and induced emf
-//I_sh is same as I_f and r_sh is same as r_f
-I_f=v_t/r_f; //Field current
-I_a=I_f+I_l; //armature current
-E_a=v_t+(I_a*r_a); //Emf of generator
-disp(sprintf("(a) The induced emf is %.1f V",E_a));
+I_f=v_t/r_f; //I_sh is same as I_f and r_sh is same as r_f
+I_a=I_f+I_l;
+E_a=v_t+(I_a*r_a);
+disp(sprintf("(a) The induced emf is %f V",E_a));
//solution (b)
arm_loss=(I_a^2)*r_a; //armature copper loss
@@ -28,17 +26,15 @@ sh_loss=(I_f^2)*r_f; //shunt field copper loss
tot_loss=arm_loss+sh_loss+s_loss;
p_o=v_t*I_l; //output power
p_i=p_o+tot_loss; //input power
-bhp=p_i/735.5; //1 metric horsepower= 735.498 W
-disp(sprintf("(b) The Break Horse Power(B.H.P.) of the prime mover is %.1f H.P.(metric)",bhp));
+bhp=p_i/735.5; //1 metric horsepower= 735.498W
+disp(sprintf("(b) The Break Horse Power(B.H.P.) of the prime mover is %f H.P.(metric)",bhp));
//solution (c)
-c_eff=(p_o/p_i)*100; //Commercial efficiency = Output/Input
-p_EE=E_a*I_a; //electrical power developed
-m_eff=(p_EE/p_i)*100; //Mechanical efficiency = electrical power/Input power
-e_eff=(p_o/p_EE)*100; //Electrical efficiency = output power/electrical power
-disp(sprintf("(c) The commercial efficiency is %.1f %%",c_eff));
-disp(sprintf("(c) The mechanical efficiency is %.1f %%",m_eff));
-disp(sprintf("(c) The electrical efficiency is %.1f %%",e_eff));
+c_eff=(p_o/p_i)*100;
+p_EE=E_a*I_a; //electrical power
+m_eff=(p_EE/p_i)*100;
+e_eff=(p_o/p_EE)*100;
+disp(sprintf("(c) The commercial efficiency is %f %%, the mechanical efficiency is %f %% and the electrical efficiency is %f %%",c_eff,m_eff,e_eff));
//END
diff --git a/1445/CH8/EX8.6/Ex8_6.sce b/1445/CH8/EX8.6/Ex8_6.sce
index 67e4601b2..fc89b9145 100644
--- a/1445/CH8/EX8.6/Ex8_6.sce
+++ b/1445/CH8/EX8.6/Ex8_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 6
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 6");
@@ -17,33 +18,33 @@ I_f=1.6; //field current in Amperes
//SOLUTION
//solution (i)
-E_b=v_t-(I_a*r_a); //Back emf
+E_b=v_t-(I_a*r_a);
w=(2*%pi*N)/60; //in radian/sec
-T_e=(E_b*I_a)/w; //electromagnetic torque
-disp(sprintf("(i) The electromagnetic torque is %.0f N-m",T_e));
+T_e=(E_b*I_a)/w;
+disp(sprintf("(i) The electromagnetic torque is %f N-m",T_e));
//solution (ii)
A=P; //since it is lap winding, so A=P and A=number of parallel paths
phi=(E_b*60*A)/(P*N*Z);
-disp(sprintf("(ii) The flux per pole is %.3f Wb",phi));
+disp(sprintf("(ii) The flux per pole is %f Wb",phi));
//solution (iii)
-//Rotational power= Power developed on rotor - Pshaft.(=Pout)
p_rotor=E_b*I_a; //power developed on rotor
p_rot=p_rotor-p_o; //p_shaft=p_out
-disp(sprintf("(iii) The rotational power is %.4f W",p_rot)); //text book answer is 870 W
+disp(sprintf("(iii) The rotational power is %f W",p_rot));
//solution (iv)
tot_loss=p_rot+((I_a^2)*r_a)+(v_t*I_f);
-p_i=p_o+tot_loss; //input power
+p_i=p_o+tot_loss;
eff=(p_o/p_i)*100;
-disp(sprintf("(iv) The efficiency is %.2f %%",eff));
+disp(sprintf("(iv) The efficiency is %f %%",eff));
//solution (v)
-T=p_o/w; //shaft torque
-disp(sprintf("(v) The shaft torque is %.0f N-m",T));
+T=p_o/w;
+disp(sprintf("(v) The shaft torque is %f N-m",T));
//The answers are slightly different due to the precision of floating point numbers
+
//END
diff --git a/1445/CH8/EX8.7/Ex8_7.sce b/1445/CH8/EX8.7/Ex8_7.sce
index 20e434a5a..0362b4f8e 100644
--- a/1445/CH8/EX8.7/Ex8_7.sce
+++ b/1445/CH8/EX8.7/Ex8_7.sce
@@ -1,11 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 7
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 7");
-//Contnuation of the Example 6
-//shaft load/ load torque remains fixed, and field flux is reduced to 80% by using field rheostat
//VARIABLE INITIALIZATION
p_o=20*746; //output power from H.P. to Watts (1 H.P.=745.699 or 746 W)
v_t=230; //in Volts
@@ -18,8 +17,8 @@ I_f=1.6; //field current in Amperes
ratio=0.8; //phi2:phi1=0.8 (here phi=flux)
//SOLUTION
-//Eb2/Eb1= phi2.W2/phi1.W1 = phi2.N2/phi1.N1
-E_b1=v_t-(I_a1*r_a); //
+
+E_b1=v_t-(I_a1*r_a);
I_a2=I_a1/ratio; //(phi2*I_a2)=(phi1*I_a1)
E_b2=v_t-(I_a2*r_a);
N2=(E_b2/E_b1)*(1/ratio)*N1; //N2:N1=(E_b2/E_b1)*(phi1/phi2)
diff --git a/1445/CH8/EX8.8/Ex8_8.sce b/1445/CH8/EX8.8/Ex8_8.sce
index 0eb7a9dd1..a2b0b8dde 100644
--- a/1445/CH8/EX8.8/Ex8_8.sce
+++ b/1445/CH8/EX8.8/Ex8_8.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 8
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 8");
-//250 V DC shunt machine
//VARIABLE INITIALIZATION
v_t=250; //in Volts
r_a=0.1; //armature resistance in Ohms
@@ -15,36 +15,31 @@ N_g=1000; //speed as generator in rpm
//SOLUTION
//machine as a generator
-I_l=p_o/v_t; //load current
-I_f=v_t/r_f; //field current, I_f is same as I_sh
-I_ag=I_l+I_f; //Output current as generator
+I_l=p_o/v_t;
+I_f=v_t/r_f; //I_f is same as I_sh
+I_ag=I_l+I_f;
E_a=v_t+(I_ag*r_a); //induced emf = E_a = E_g
//machine as a motor
-I_l=p_o/v_t; //full load current
-I_f=v_t/r_f;
-I_am=I_l-I_f; //output current as motor
-E_b=v_t-(I_am*r_a); //back emf = E_b = E_m
+I_l=p_o/v_t;
+I_f=v_t/r_f;
+I_am=I_l-I_f;
+E_b=v_t-(I_am*r_a); //back emf = E_b = E_m
//solution (a)
-N_m=(N_g*E_b)/E_a; //Speed of motor in RPM
+N_m=(N_g*E_b)/E_a;
N_m=round(N_m); //to round off the value of N_m
disp(sprintf("(a) The speed of the same machine as a motor is %d rpm",N_m));
//solution (b)
-//internal power developed as generator
+
//(i)
-//total power developed in the armature
-//=Eg.Iag
-p_g=(E_a*I_ag)/1000; //to express the answer in kW divide by 1000
-disp(sprintf("(b) (i) The internal power developed as generator is %.1f kW",p_g));
+p1=(E_a*I_ag)/1000; //to express the answer in kW
+disp(sprintf("(b) (i) The internal power developed as generator is %f kW",p1));
//(ii)
-//internal power developed as motor
-// is total power developed in armature
-//=Em.Iam
-p_m=(E_b*I_am)/1000;
-disp(sprintf("(b) (ii) The internal power developed as motor is %.1f kW",p_m));
+p2=(E_b*I_am)/1000;
+disp(sprintf("(b) (ii) The internal power developed as motor is %f kW",p2));
//END
diff --git a/1445/CH8/EX8.9/Ex8_9.sce b/1445/CH8/EX8.9/Ex8_9.sce
index fa24acd41..e518f9827 100644
--- a/1445/CH8/EX8.9/Ex8_9.sce
+++ b/1445/CH8/EX8.9/Ex8_9.sce
@@ -1,10 +1,10 @@
//CHAPTER 8- DIRECT CURRENT MACHINES
//Example 9
+clc;
disp("CHAPTER 8");
disp("EXAMPLE 9");
-//4 Pole 230 V lap wound shunt motor with 600 conductors. RPM 1800
//VARIABLE INITIALIZATION
P=4; //number of poles
v_t=230; //in Volts
@@ -16,14 +16,13 @@ l=20/100; //effective length of pole
B=4100/10000; //flux density from Gauss to Wb/m^2
//SOLUTION
-
I_f=v_t/r_f; //I_f is same as I_sh
-I_a=I_l-I_f; // armature current
+I_a=I_l-I_f;
ar=(%pi*d*l)/P; //area of pole
phi=ar*B; //phi = flux
-A=P; //for lap winding
-T=(phi*Z*I_a)/(2*%pi*A); //Torque developed
-disp(sprintf("The torque developed in the motor is %.4f N-m",T));
+A=P;
+T=(phi*Z*I_a)/(2*%pi*A);
+disp(sprintf("The torque developed in the motor is %f N-m",T));
//The answer is different as 'A' has not been included in the denominator(in the book)