summaryrefslogtreecommitdiff
path: root/196/CH2/EX2.2
diff options
context:
space:
mode:
Diffstat (limited to '196/CH2/EX2.2')
-rwxr-xr-x196/CH2/EX2.2/example_2_2.sce18
-rwxr-xr-x196/CH2/EX2.2/result_2_2.txt4
2 files changed, 22 insertions, 0 deletions
diff --git a/196/CH2/EX2.2/example_2_2.sce b/196/CH2/EX2.2/example_2_2.sce
new file mode 100755
index 000000000..6608ff270
--- /dev/null
+++ b/196/CH2/EX2.2/example_2_2.sce
@@ -0,0 +1,18 @@
+//Chapter 2
+//Example 2-2
+//ProbOnPWM
+//Page 34
+clear;clc;
+//Given
+f=50;//in Hz
+Vtemp=4; //input signal in volts
+Ecm=10; //maximum peak voltage of sawtooth carrier wave in volts
+
+//Example 2-2(a)
+T=1/f;
+Th=(Vtemp*T)/Ecm;//High time in seconds
+printf("\n\n High Time = %.4f s \n\n",Th)
+
+//Example 2-2(b)
+d=(Th/T)*100;//duty cycle in percentage
+printf("\n\n Duty cycle = %.4f percent \n\n",d)
diff --git a/196/CH2/EX2.2/result_2_2.txt b/196/CH2/EX2.2/result_2_2.txt
new file mode 100755
index 000000000..57a3d0240
--- /dev/null
+++ b/196/CH2/EX2.2/result_2_2.txt
@@ -0,0 +1,4 @@
+
+High Time = 0.0080 s
+
+Duty cycle = 40.0000 percent \ No newline at end of file