Rescale

Rescale[x,{min,max}]

gives x rescaled to run from 0 to 1 over the range min to max.

Rescale[x,{min,max},{ymin,ymax}]

gives x rescaled to run from ymin to ymax 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].

Details

  • 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.

Examples

open allclose all

Basic Examples  (3)

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

Rescale so that all the list elements run from 0 to 1:

Plot over a subset of the reals:

Scope  (24)

Numerical Evaluation  (5)

Evaluate numerically:

Complex number inputs:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Evaluate efficiently at high precision:

Rescale threads over lists in its first argument:

Specify the maximum and minimum values:

Specific Values  (6)

Value at zero:

Values at the endpoints:

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

Value with a degenerate third argument:

Rescale a list with symbolic quantities:

Find a value of x for which the Rescale[x,{-2,2}]=1:

Visualization  (3)

Visualize two Rescale expressions with reversed endpoints in the second argument:

Visualize two Rescale expressions with reversed endpoints in the third argument:

Visualize Rescale in the complex plane:

Function Properties  (4)

Rescale is defined for all real and complex inputs in its first argument:

The domain of the endpoints in the second and third arguments:

The only restriction is that endpoints in the second argument must be distinct:

Rescale achieves all real and complex values:

The one-argument form for a list can be expressed using Min and Max:

Rescale[list] is effectively Rescale[list,{Min[list],Max[list]}]:

Differentiation and Integration  (6)

First derivative with respect to x:

First and second derivatives with respect to x:

Formula for the ^(th) derivative with respect to x:

First derivative with respect to an endpoint:

Compute the indefinite integral using Integrate:

Verify the anti-derivative:

Definite integral:

Applications  (1)

Make a Celsius-to-Fahrenheit conversion table:

Properties & Relations  (3)

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:

Wolfram Research (2004), Rescale, Wolfram Language function, https://reference.wolfram.com/language/ref/Rescale.html.

Text

Wolfram Research (2004), Rescale, Wolfram Language function, https://reference.wolfram.com/language/ref/Rescale.html.

CMS

Wolfram Language. 2004. "Rescale." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Rescale.html.

APA

Wolfram Language. (2004). Rescale. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Rescale.html

BibTeX

@misc{reference.wolfram_2024_rescale, author="Wolfram Research", title="{Rescale}", year="2004", howpublished="\url{https://reference.wolfram.com/language/ref/Rescale.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_rescale, organization={Wolfram Research}, title={Rescale}, year={2004}, url={https://reference.wolfram.com/language/ref/Rescale.html}, note=[Accessed: 22-November-2024 ]}