Difference between revisions of "Max Command"
From GeoGebra Manual
Noel Lambert (talk | contribs) |
m (removed extra CAS syntax) |
||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} | ||
− | ;Max[ | + | ;Max[ <List> ] |
:Returns the maximum of the numbers within the list. | :Returns the maximum of the numbers within the list. | ||
:{{example| 1=<code><nowiki>Max[{-2, 12, -23, 17, 15}]</nowiki></code> yields ''17''.}} | :{{example| 1=<code><nowiki>Max[{-2, 12, -23, 17, 15}]</nowiki></code> yields ''17''.}} | ||
:{{note| 1=If the input consists of non-numeric objects, then this command considers the numbers associated with those objects. If you have a list of segments for example, the command ''Max[ <List> ]'' will yield the maximum segment length.}} | :{{note| 1=If the input consists of non-numeric objects, then this command considers the numbers associated with those objects. If you have a list of segments for example, the command ''Max[ <List> ]'' will yield the maximum segment length.}} | ||
− | |||
− | |||
;Max[ <Interval> ] | ;Max[ <Interval> ] | ||
:Returns the upper bound of the interval. | :Returns the upper bound of the interval. | ||
:{{example| 1=<code><nowiki>Max[2 < x < 3]</nowiki></code> yields ''3''.}} | :{{example| 1=<code><nowiki>Max[2 < x < 3]</nowiki></code> yields ''3''.}} | ||
:{{note| 1=Open and closed intervals are treated the same.}} | :{{note| 1=Open and closed intervals are treated the same.}} | ||
− | |||
− | |||
;Max[ <Number>, <Number> ] | ;Max[ <Number>, <Number> ] | ||
:Returns the maximum of the two given numbers. | :Returns the maximum of the two given numbers. | ||
:{{example| 1=<code><nowiki>Max[12, 15]</nowiki></code> yields ''15''.}} | :{{example| 1=<code><nowiki>Max[12, 15]</nowiki></code> yields ''15''.}} | ||
− | |||
− | |||
;Max[ <Function>, <Start x-Value>, <End x-Value> ] | ;Max[ <Function>, <Start x-Value>, <End x-Value> ] | ||
:Calculates the maximum point of the function in the given interval. The function should be continuous and have only one ''local'' maximum point in the interval. | :Calculates the maximum point of the function in the given interval. The function should be continuous and have only one ''local'' maximum point in the interval. | ||
:{{example| 1=<code><nowiki>Max[ x^3 + 2x^2 - 1, -2, 0]</nowiki></code> creates the point (-1.33, 0.19).}} | :{{example| 1=<code><nowiki>Max[ x^3 + 2x^2 - 1, -2, 0]</nowiki></code> creates the point (-1.33, 0.19).}} | ||
− | + | ;Max[<List of Data>, <List of Frequencies> ] | |
− | |||
− | ;Max[ | ||
:Returns the maximum of the list of data with corresponding frequencies. | :Returns the maximum of the list of data with corresponding frequencies. | ||
:{{example| 1=<code><nowiki>Max[{1, 2, 3, 4, 5}, {5, 3, 4, 2, 0}]</nowiki></code> yields 4, the highest number of the list whose frequency is greater than 0.}} | :{{example| 1=<code><nowiki>Max[{1, 2, 3, 4, 5}, {5, 3, 4, 2, 0}]</nowiki></code> yields 4, the highest number of the list whose frequency is greater than 0.}} | ||
− | + | {{note| 1=See also [[Extremum Command]], [[Min Command]] and [[Function Inspector Tool]].}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 16:01, 1 October 2015
- Max[ <List> ]
- Returns the maximum of the numbers within the list.
- Example:
Max[{-2, 12, -23, 17, 15}]
yields 17.
- Note: If the input consists of non-numeric objects, then this command considers the numbers associated with those objects. If you have a list of segments for example, the command Max[ <List> ] will yield the maximum segment length.
- Max[ <Interval> ]
- Returns the upper bound of the interval.
- Example:
Max[2 < x < 3]
yields 3.
- Note: Open and closed intervals are treated the same.
- Max[ <Number>, <Number> ]
- Returns the maximum of the two given numbers.
- Example:
Max[12, 15]
yields 15.
- Max[ <Function>, <Start x-Value>, <End x-Value> ]
- Calculates the maximum point of the function in the given interval. The function should be continuous and have only one local maximum point in the interval.
- Example:
Max[ x^3 + 2x^2 - 1, -2, 0]
creates the point (-1.33, 0.19).
- Max[<List of Data>, <List of Frequencies> ]
- Returns the maximum of the list of data with corresponding frequencies.
- Example:
Max[{1, 2, 3, 4, 5}, {5, 3, 4, 2, 0}]
yields 4, the highest number of the list whose frequency is greater than 0.
Note: See also Extremum Command, Min Command and Function Inspector Tool.