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.
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 allBasic Examples (3)
Scope (24)
Numerical Evaluation (5)
The precision of the output tracks the precision of the input:
Evaluate efficiently at high precision:
Rescale threads over lists in its first argument:
Specific Values (6)
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)
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 derivative with respect to x:
First derivative with respect to an endpoint:
Compute the indefinite integral using Integrate:
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