
代码实例

网友问题

解决方案1

代码文件

解决方案2
So we need to do a translation and a scaling. Now if instead we want to get arbitrary values of a and b, we need something a little more complicated:

正确答案
【参考】http://stats.stackexchange.com/questions/70801/how-to-normalize-data-to-0-1-range
【参考】http://stackoverflow.com/questions/5294955/how-to-scale-down-a-range-of-numbers-with-a-known-min-and-max-value
