Hi, I have an assignment and I need some help.

1 view (last 30 days)
The question follows: "Construct a funcion [quantized_signal,var_lin,var_sat,SNqR]= My_quantizer(unquantized_signal,V_p,N), that uses an 2^N quantization levels, equally spaced on [−Vp, Vp], to quantize a signal. The function should return a vector containing the quantized levels of the input signal, empirical estimations of the variance of the linear as well as of the saturated errors"
Does anyone have any suggestions or solutions on how I should approach this question or does anyone have any idea for a code for it?
  5 Comments
Simon Ekström
Simon Ekström on 20 Feb 2018
lets say for example, we have a sampled signal s = [-4 1 5] that should be quantized with 2 bits and with Vp = 4 so that the the quantization levels should be [−3, −1, 1, 3], how should I modify my code so this becomes the result?
Guillaume
Guillaume on 20 Feb 2018
Edited: Guillaume on 20 Feb 2018
Have a look at the discretize function which will give you the indices into your quantization vector.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!