how to convert range of values in matlab? -


i want these values converted range of 1-100 a= [0 -24 14 34 8 41 55...]

with minimum value of -30 , maximum value of 57

you can standard normalization, this:

a = [0 -24 14 34 8 41 55 -30 57]; minimum = -30; maximum =  57; b = 1 + 99 * (a - minimum) / (maximum - minimum); 

after running, b = [35.1379 7.8276 51.0690 73.8276 44.2414 81.7931 97.7241 1.0000 100.0000]


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -