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 to 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].

DetailsDetails

  • Rescale[x, {min, max}] is effectively equivalent to .
  • 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.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Rescale to run from 0 to 1 over the range to 10:

In[1]:=
Click for copyable input
Out[1]=

Rescale x to run from to when its values run from to :

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
New to Mathematica? Find your learning path »
Have a question? Ask support »