summaryrefslogtreecommitdiff
path: root/2621/CH10/EX10.6/Ex10_6.sce
diff options
context:
space:
mode:
Diffstat (limited to '2621/CH10/EX10.6/Ex10_6.sce')
-rw-r--r--2621/CH10/EX10.6/Ex10_6.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/2621/CH10/EX10.6/Ex10_6.sce b/2621/CH10/EX10.6/Ex10_6.sce
new file mode 100644
index 000000000..aebe3121e
--- /dev/null
+++ b/2621/CH10/EX10.6/Ex10_6.sce
@@ -0,0 +1,15 @@
+// Example 10.6
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+V_REF= 1.25;// in V
+R1= 3*10^3;// in Ω
+R2= 1*10^3;// in Ω
+Vin= 20;// in V
+Vout= V_REF*(R1+R2)/R2;// output voltage in volts
+// Duty cycle,
+D= Vout/Vin*100;// in %
+disp("The duty cycle is "+string(D)+" %")
+