MATLAB: Changing the quantization range while using ‘uencode’

uencode

While using 'uencode', the quantization takes place in steps of 1 starting from 0 (y-axis). How can I change this to, let's say, -10 to 10?

Best Answer

Use rescale()
x = rand(1, 10);
y = uencode(x, 3);
y_new = rescale(y, -10, 10);
Related Question