From 7bc77cb1ed33745c720952c92b3b2747c5cbf2df Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Sat, 3 Feb 2018 11:01:52 +0530 Subject: Added new code --- 3871/CH14/EX14.5/Ex14_5.sce | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 3871/CH14/EX14.5/Ex14_5.sce (limited to '3871/CH14/EX14.5/Ex14_5.sce') diff --git a/3871/CH14/EX14.5/Ex14_5.sce b/3871/CH14/EX14.5/Ex14_5.sce new file mode 100644 index 000000000..706237a9d --- /dev/null +++ b/3871/CH14/EX14.5/Ex14_5.sce @@ -0,0 +1,26 @@ +//===================================================================================== +//Chapter 14 example 5 +clc; +clear all; + +//variable declaration +t = 5*10^6; //time reaading in ms +t2 = 500; //time reaading in ms +x = 0.005; //accuracy in percent of reading +t3 = 500*10^3; //time reaading in ms + +//calculations +e = ((x/100)*t)+1; //maximum likely timing error in ms +e1 = ((x/100)*t2)+1; //maximum timing error in ms +a = t2*10^6; //maximum accuracy mininum error will be obtained when the time is read on the us read +e3 = ((x/100)*t3)+1; //maximum timing error in ms + +//result +mprintf("maximum likely timing error when time reading is 05000000 ms = %3.2f ms",e); +mprintf("\nmaximum timing error when time reading is 00000500 ms = %3.2f ms",e1); +mprintf("\nmaximum error when time reading is 00500000 = %3.2f ms",e3); + + + + + -- cgit