This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Rescale

Rescale[x, {min, max}]
gives x rescaled to run from 0 to 1 over the range min to max.
Rescale[x, {min, max}, {xmin, xmax}]
gives x rescaled to run from xmin to xmax over the range min to max.
Rescale[list]
rescales each element of list to run from 0 to 1 over the range Min[list] to Max[list].
  • Rescale[x, {min, max}] is effectively equivalent to (x-min)/(max-min).
  • For exact numeric quantities, Rescale internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Rescale works with complex numbers and symbolic quantities.
Rescale to run from 0 to 1 over the range -10 to 10:
In[1]:=
Click for copyable input
Out[1]=
 
Rescale x to run from a to b when its values run from c to d:
In[1]:=
Click for copyable input
Out[1]=
 
Rescale so that all the list elements run from 0 to 1:
In[1]:=
Click for copyable input
Out[1]=
New in 5.1