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 /45/CH15/EX15.6/example_15_6.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 '45/CH15/EX15.6/example_15_6.sce')
-rwxr-xr-x | 45/CH15/EX15.6/example_15_6.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/45/CH15/EX15.6/example_15_6.sce b/45/CH15/EX15.6/example_15_6.sce new file mode 100755 index 000000000..d4288d07f --- /dev/null +++ b/45/CH15/EX15.6/example_15_6.sce @@ -0,0 +1,15 @@ +//example 15.6
+clc;
+clear;
+//s= input('Enter the clk freqency in kHz : ');
+//f=input('Enter the frequency of the unknown input in Hz :');
+s=100;// taking the inputs
+f=200;
+g=1000000/f; // making neccesary calculations
+c=g*s/1000;
+c=round(c);
+p=c*1000/s;
+disp('Assuming that the conter and the display are initially at 00000');//displaying results
+printf('Enable gate time in micro secnds will be : %d\n',g);
+printf('During the gate time the counter will be advced by (number of counts ) %d \n',c);
+printf('The time period of the unknown input in micro-seconds is : %d',p);
|