From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 737/CH2/EX2.9/Example2_09.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 737/CH2/EX2.9/Example2_09.sce (limited to '737/CH2/EX2.9/Example2_09.sce') 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"); -- cgit