uniform quantizer for sine wave with amplitude -1 db
With simulink, use the quantizer block: https://www.mathworks.com/help/simulink/slref/quantizer.html

The same page describes the "matlab script" equivalent:

y = q * round(u/q)
where y is the quantized output, u is the input, and q is the Quantization interval.


This will provide an output in the same units as input. If you wish for the output to be a raw quantization count, just remove the multiplication by quantization interval.