simulate a uniform quantizer that takes as an input a vector of numbers and returns as an output the quantized vector.
1-Generate a random input vector of 10000 samples randomly in the range from [- 7, 7].
2-Simulate your quantizer three times with number of levels that are equal to 2 , 4 and 8.
3-The m-file output should include:
1. The 3 quantized vectors for the uniform quantizer with levels 2,4 and 8 respectively ( just display the first six elements from the original and the quantized vectors)
2. Calculate the absolute quantization error for the uniform quantizer with number of levels equal to 2, 4 and 8 respectively. Plot the absolute quantization error vs Number of Levels. (Comment on the output figure)
3. Calculate the variance of the quantization error for the uniform quantizer with number of levels equal to 2, 4 and 8 respectively. Plot the variance of the quantization error vs the Number of levels and Plot the theoretical variance of the quantization error vs the Number of levels on the same figure.
4. Get the SQNR of the uniform quantizer with number of levels equal to 2, 4 and 8 respectively. Plot the SQNR vs the Number of levels and Plot the theoretical SQNR vs the Number of levels on the same figure. (Comment on the output figure).
__________
Help to solve this problem ASAP ..Deep thanks