Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Numerical Data > Data Transforms and Smoothing >
Mathematica > Data Manipulation > Statistics > Data Transforms and Smoothing >
Mathematica > Mathematics and Algorithms > Statistics > Data Transforms and Smoothing >

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:
Rescale x to run from a to b when its values run from c to d:
Rescale so that all the list elements run from 0 to 1:
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]=
Rescale a list of values:
Rescale with exact or symbolic quantities:
Rescale in the complex plane:
Make a Celsius-to-Fahrenheit conversion table:
In the complex plane, Rescale just scales and rotates a region:
Reversing both range specifications gives back the same result:
Rescale is effectively linear with respect to its first argument:
New in 5.1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team