From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 45/CH15/EX15.1/example_15_1.sce | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 45/CH15/EX15.1/example_15_1.sce (limited to '45/CH15/EX15.1') 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 + + -- cgit