Azzera filtri
Azzera filtri

Changing the quantization range while using 'uencode'

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Ameer Hamza
Ameer Hamza il 12 Set 2020
Use rescale()
x = rand(1, 10);
y = uencode(x, 3);
y_new = rescale(y, -10, 10);

Più risposte (1)

Siddharth Gopujkar
Siddharth Gopujkar il 12 Set 2020
Thank you!
The random number generation didn't help, but just using rescale helped!

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by