Rescale ranges

Lets say I have values in a range from 0-1 and I want to rescale them to a range of 1 to 25. Generally speaking this can be resolved by: n.min + (x – o.min) * (n.max – n.min)/(o.max – o.min), where x is the value that is rescaled and n and o stand for new and old. For example to rescale the value 0.5 on our old scale ranging from 0 to 1 to our new scale we use:
1+(0.5-0)*(25-1)/(1-0) = 13

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s