diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /182/CH5/EX5.5/example5_5.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '182/CH5/EX5.5/example5_5.sce')
-rwxr-xr-x | 182/CH5/EX5.5/example5_5.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/182/CH5/EX5.5/example5_5.sce b/182/CH5/EX5.5/example5_5.sce new file mode 100755 index 000000000..f5403b3ff --- /dev/null +++ b/182/CH5/EX5.5/example5_5.sce @@ -0,0 +1,15 @@ +//To find the number of pulses counted
+//example5-5 in page 131
+clc;
+//data given
+Vr=1.25;//peak voltage of ramp in volts
+tr=125e-3;//time period of the ramp=1.25 ms
+T=1/(1e+6);// frequency =1 Mhz and time period of the clock pulses is 1/f
+for Vi=0.75:(0.9-0.75):0.9,// analog input voltages for which clock pulses has to b found
+ t1=(tr/Vr)*Vi;//time period of the comparator high out put
+ N=t1/T;// pulses counted
+ printf("number of pulses counted for Vi=%.2f V are %d\n",Vi,N/100);
+end
+//result
+//number of pulses counted for Vi=0.750000 V are 750
+//number of pulses counted for Vi=0.900000 V are 900
\ No newline at end of file |