diff options
Diffstat (limited to 'Working_Examples/154/DEPENDENCIES/ch7_26.sce')
-rwxr-xr-x | Working_Examples/154/DEPENDENCIES/ch7_26.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Working_Examples/154/DEPENDENCIES/ch7_26.sce b/Working_Examples/154/DEPENDENCIES/ch7_26.sce new file mode 100755 index 0000000..8b76377 --- /dev/null +++ b/Working_Examples/154/DEPENDENCIES/ch7_26.sce @@ -0,0 +1,17 @@ +clc
+disp("Example 7.26")
+printf("\n")
+
+printf("Given")
+disp("Period =10s")
+disp("Interval is 1ms")
+disp("Voltage of binary signal is either 0.5 or -0.5")
+T=10;
+//During 10s period there are 10000 intervals of 1ms each
+//For calculating average equal number of intervals are considered at 0.5V and -0.5V
+vavg=(0.5*5000-0.5*5000)/10000
+//The effective value of v(t) is
+//Let V=V^2eff
+V=(0.5^2*5000+(-0.5)^2*5000)/10000
+Veff=sqrt(V)
+printf("vavg=%dV\nVeff=%3.2fV\n",vavg,Veff)
|