How can I adjust my numbers

3 Ansichten (letzte 30 Tage)
Yosi Nifusi
Yosi Nifusi am 1 Jun. 2016
Kommentiert: Yosi Nifusi am 2 Jun. 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,

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by