diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /737/CH2/EX2.9 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '737/CH2/EX2.9')
-rw-r--r-- | 737/CH2/EX2.9/Example2_09.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/737/CH2/EX2.9/Example2_09.sce b/737/CH2/EX2.9/Example2_09.sce new file mode 100644 index 000000000..41ebc3c03 --- /dev/null +++ b/737/CH2/EX2.9/Example2_09.sce @@ -0,0 +1,23 @@ +//Example 2.9 Page 39
+//Assuming that a 3-bit ADC channel accepts analog input ranging from 0 to 5
+//volts, determine the following:
+//a. number of quantization levels
+//b. step size of the quantizer or resolution
+//c. quantization level when the analog voltage is 3.2 volts
+
+clc,clear,close;
+xmin = 0, xmax = 5;//volts
+m = 3;//bits
+
+L = 2^m;
+disp("L = "+string(L)+" bits");
+
+delta = (xmax-xmin)/L;
+disp("delta = "+string(delta)+" volts");
+
+x = 3.2*delta/6.25
+i = round((x-xmin)/delta);
+disp("i= "+string(i)+" volts");
+
+xq = xmin+5*delta;
+disp("xq= "+string(xq)+" volts");
|