Rescale
Linearly rescale a value or list from one range to another.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Rescale!Rescale(list)rescale every element of list so its own minimum maps to 0 and its maximum to 1.Rescale(x, {min, max})(x - min) / (max - min) -- x rescaled from {min, max} to {0, 1}.Rescale(x, {min, max}, {ymin, ymax})x rescaled from {min, max} to {ymin, ymax}.Typed signatures
| Type | Package | Applies |
|---|---|---|
(list<real> | real, vector<real^2>?, vector<real^2>?) -> list<real> | real | analytic | always |
Details
- A bare scalar with no range to rescale against -- Rescale(x) where x is not a list -- has no sensible reading and stays unevaluated.
- Rescale(x, {min, max}) is Rescale(x, {min, max}, {0, 1}) with the target range left implicit.
- Exact rational input and bounds give an exact rational result, which
N(…, d)rounds once, so every digit asked for is right.
Examples
About
| Examples | 8 |
|---|---|
| Checked against | Wolfram Language 7 agree1 differ |
| Crosswalk | Wolfram Language |