diff options
Diffstat (limited to '737/CH2/EX2.10/Example2_10.sce')
-rw-r--r-- | 737/CH2/EX2.10/Example2_10.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/737/CH2/EX2.10/Example2_10.sce b/737/CH2/EX2.10/Example2_10.sce new file mode 100644 index 000000000..38bfd3493 --- /dev/null +++ b/737/CH2/EX2.10/Example2_10.sce @@ -0,0 +1,19 @@ +//Example 2.10 page 42
+//Using Example 2.9, determine the quantization error when the analog
+//input is 3.2 volts.
+
+
+clc,clear,close;
+xmin = 0, xmax = 5;//volts
+m = 3;//bits
+
+L = 2^m;
+
+delta = (xmax-xmin)/L;
+
+x = 3.2;
+
+xq = xmin+5*delta;
+
+eq = xq-x;
+disp("eq = "+string(eq));
\ No newline at end of file |