Difference between revisions of "Normalize Command"
From GeoGebra Manual
m |
(* If you are doing calculations using big or small numbers (eg using FitGrowth) then normalizing them might avoid rounding/overflow errors) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function|Normalize}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function|Normalize}} | ||
− | ;Normalize | + | ;Normalize( <List of Numbers> ): Returns a list containing the ''normalized'' form of the given numbers. |
− | :{{example|<code>Normalize | + | :{{example|<code>Normalize({1, 2, 3, 4, 5})</code> returns ''{0, 0.25, 0.5, 0.75, 1}''.}} |
− | ;Normalize | + | ;Normalize( <List of Points> ) : Returns a list containing the ''normalized'' form of the given points. |
− | :{{example|<code>Normalize | + | :{{example|<code>Normalize({(1,5), (2,4), (3,3), (4,2), (5,1)})</code> returns ''{(0,1), (0.25,0.75), (0.5,0.5), (0.75,0.25), (1,0)}''.}} |
{{Notes|1= | {{Notes|1= | ||
+ | * If you are doing calculations using big or small numbers (eg using [[FitGrowth Command|FitGrowth]]) then normalizing them might avoid rounding/overflow errors | ||
*This command is not applicable to 3D points. | *This command is not applicable to 3D points. | ||
*The operation of ''normalization'' maps a value ''x'' to the interval [0, 1] using the linear function <math>x \mapsto \frac{x-Min[list]}{Max[list]-Min[list]}</math>.}} | *The operation of ''normalization'' maps a value ''x'' to the interval [0, 1] using the linear function <math>x \mapsto \frac{x-Min[list]}{Max[list]-Min[list]}</math>.}} |
Latest revision as of 12:48, 4 February 2019
- Normalize( <List of Numbers> )
- Returns a list containing the normalized form of the given numbers.
- Example:
Normalize({1, 2, 3, 4, 5})
returns {0, 0.25, 0.5, 0.75, 1}.
- Normalize( <List of Points> )
- Returns a list containing the normalized form of the given points.
- Example:
Normalize({(1,5), (2,4), (3,3), (4,2), (5,1)})
returns {(0,1), (0.25,0.75), (0.5,0.5), (0.75,0.25), (1,0)}.
Notes:
- If you are doing calculations using big or small numbers (eg using FitGrowth) then normalizing them might avoid rounding/overflow errors
- This command is not applicable to 3D points.
- The operation of normalization maps a value x to the interval [0, 1] using the linear function x \mapsto \frac{x-Min[list]}{Max[list]-Min[list]}.