How can I adjust my numbers

3 visualizaciones (últimos 30 días)
Yosi Nifusi
Yosi Nifusi el 1 de Jun. de 2016
Comentada: Yosi Nifusi el 2 de Jun. de 2016
Hello,
Lets say I have random 64.000 numbers. Min = -36.000 and Max is = 40.000, I want to make the minimum number equals to 0 and maximum number 255 and the rest of numbers has to be adjust accordingly. Is there any way that I can do such thing ?
Thank you,

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 1 de Jun. de 2016
out = (yourarray - min1)/(max1-min1)*255
  1 comentario
Yosi Nifusi
Yosi Nifusi el 2 de Jun. de 2016
Okay thanks, I have done something similar to that and its working

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by