summaryrefslogtreecommitdiff
path: root/45/CH15/EX15.1/example_15_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /45/CH15/EX15.1/example_15_1.sce
downloadScilab-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.1/example_15_1.sce')
-rwxr-xr-x45/CH15/EX15.1/example_15_1.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/45/CH15/EX15.1/example_15_1.sce b/45/CH15/EX15.1/example_15_1.sce
new file mode 100755
index 000000000..6344f56e6
--- /dev/null
+++ b/45/CH15/EX15.1/example_15_1.sce
@@ -0,0 +1,17 @@
+//example 15.1
+//timing for a six digit display
+clc;
+clear;
+//f=input('Enter the repetition rate in Hz :');
+//d= input('Enter the length of display :');
+f=125; // given inputs
+d=6;
+format('v',5); //changing the precision of the calculation
+k=1000/f;
+l=1000/(f*d);//making neccesary calculations
+m=k-l;
+printf('All digits must be serviced once every %f milliseconds \n',k);
+printf('Each digit will be ON for : %f milliseconds\n',l) ;
+printf('and OFF for : %f milliseconds',m); //displaying results
+
+