summaryrefslogtreecommitdiff
path: root/3871/CH14/EX14.9/Ex14_9.sce
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3871/CH14/EX14.9/Ex14_9.sce
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-master.tar.gz
Scilab-TBC-Uploads-master.tar.bz2
Scilab-TBC-Uploads-master.zip
Added new codeHEADmaster
Diffstat (limited to '3871/CH14/EX14.9/Ex14_9.sce')
-rw-r--r--3871/CH14/EX14.9/Ex14_9.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/3871/CH14/EX14.9/Ex14_9.sce b/3871/CH14/EX14.9/Ex14_9.sce
new file mode 100644
index 000000000..63e0840bb
--- /dev/null
+++ b/3871/CH14/EX14.9/Ex14_9.sce
@@ -0,0 +1,30 @@
+//=====================================================================================
+//Chapter 14 example 9
+
+clc;
+clear all;
+
+//variable declaration
+n =4; //number of full digits
+v1 = 10; //voltage in V
+V1 = 1; //voltage in V
+V2 =10; //voltage in V
+
+//calculations
+R = 1/(10^n); //resolution
+R1 = R*v1; //resolution on 1V range in V
+R2 = R*V1; //resolution on 1V range in V for display 0.6132 V
+R3 = R*V2; //resolution on 10V range in V for display 0.6132 V
+
+//result
+mprintf("R = %3.4f V",R);
+mprintf("\nR1 = %3.4f V",R1);
+mprintf("\nany decimal upto third decimal can be displayed ");
+mprintf("\nhence 13.97 can be dislayed as 13.970")
+mprintf("\n R2 = %3.4f V",R2);
+mprintf("\nany deccimal upto fourth decimal can be displayed on 1V");
+mprintf("\nhence 0.6132 can be dislayed as 0.6132 V");
+mprintf("\n R3 = %3.4f V",R3);
+mprintf("\nany deccimal upto third decimal can be displayed on 10 V ");
+mprintf("\nhence 0.6132 can be dislayed as 0.613 V");
+