Difference between revisions of "Take Command"

From GeoGebra Manual
Jump to: navigation, search
m (Bot: Automated text replacement (-{{command +{{command|cas=true))
Line 9: Line 9:
 
:Returns a list containing the elements from position ''m'' to ''n'' of the initial list.
 
:Returns a list containing the elements from position ''m'' to ''n'' of the initial list.
 
:{{example| 1=<div><code><nowiki>Take[{1, 2, a, 4, 5}, 2, 4]</nowiki></code> yields ''{2, a, 4}''.</div>}}
 
:{{example| 1=<div><code><nowiki>Take[{1, 2, a, 4, 5}, 2, 4]</nowiki></code> yields ''{2, a, 4}''.</div>}}
 +
{{betamanual|version=4.2|
 +
{{Note|1=From GeoGebra 4.2, this syntax will work too: Take[ <Text>, <Start Position m>, <End Position n> ]}}
 +
}}

Revision as of 11:56, 5 July 2012


Take[ <List>, <Start Position m>, <End Position n> ]
Returns a list containing the elements from position m to n of the initial list.
Take[ <Text>, <Start Position m>, <End Position n>]
Returns a text containing the elements from position m to n of the initial text.

CAS Syntax

Take[ <List>, <Start Position m>, <End Position n>]
Returns a list containing the elements from position m to n of the initial list.
Example:
Take[{1, 2, a, 4, 5}, 2, 4] yields {2, a, 4}.
© 2024 International GeoGebra Institute