In evaluating the effect of a fixed-point quantizing process, the assumption was made that the error induced by the quantizing process can be represented by a uniformly distributed random value. In this problem we investigate the validity of this assumption.
(a) Use sin(6t) as a signal. Using a sampling frequency of 20 Hz, generate, using MATLAB, a vector of 10,000 samples of this waveform. Note that the signal frequency and the sampling frequency are not harmonically related. Why was this done?
(b) Develop a MATLAB model for a fixed-point quantizer that contains 16 quantizing levels (b = 4). Using this model quantize the sample values generated in (a). Generate a vector representing the 10,000 values of quantizing error.
(c) Compute the values of E{e[k]} and E{e2[k]}. Compare with the theoretical values and explain the results.
(d) Using the MATLAB function hist, generate a histogram of the quantizing errors. What do you conclude?