powered by
Maps a range of numbers to a given interval
MapToInterval(nums, start = 1, stop = 10)
The original numbers mapped to the given interval
The vector of numbers to be mapped
The start of the interval
The end of the interval
Jared P. Lander www.jaredlander.com
formula: a + (x - min(x)) * (b - a) / (max(x) - min(x))
mapping
MapToInterval(1:10, start=0, stop=1) mapping(1:10, start=0, stop=1)
Run the code above in your browser using DataLab