Difference between revisions of "Sequence Command"
From GeoGebra Manual
m |
(removed extra CAS syntax) |
||
Line 12: | Line 12: | ||
:*<code><nowiki>Sequence[4]</nowiki></code> creates list ''{1, 2, 3, 4}''. | :*<code><nowiki>Sequence[4]</nowiki></code> creates list ''{1, 2, 3, 4}''. | ||
:*<code><nowiki>2^Sequence[4]</nowiki></code> creates list ''{2, 4, 8, 16}''.</div>}} | :*<code><nowiki>2^Sequence[4]</nowiki></code> creates list ''{2, 4, 8, 16}''.</div>}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
:{{note| 1=See [[Lists]] for more information on list operations.}} | :{{note| 1=See [[Lists]] for more information on list operations.}} |
Revision as of 13:29, 23 October 2015
- Sequence[ <Expression>, <Variable i>, <Start Value a>, <End Value b> ]
- Yields a list of objects created using the given expression and the index i that ranges from start value a to end value b.
- Example:
Sequence[(2, i), i, 1, 5]
creates a list of points whose y-coordinates range from 1 to 5: {(2, 1), (2, 2), (2, 3), (2, 4), (2, 5)}.
- Sequence[ <Expression>, <Variable i>, <Start Value a>, <End Value b>, <Increment> ]
- Yields a list of objects created using the given expression and the index i that ranges from start value a to end value b with given increment.
- Example:
Sequence[(2, i), i, 1, 3, 0.5]
creates a list of points whose y-coordinates range from 1 to 3 with an increment of 0.5: {(2, 1), (2, 1.5), (2, 2), (2, 2.5), (2, 3)}.
- Note: Since the parameters a and b are dynamic you could use slider variables in both cases above as well.
- Sequence[ <End Value b> ]
- Creates list of numbers from 1 to end value b.
- Example:
Sequence[4]
creates list {1, 2, 3, 4}.2^Sequence[4]
creates list {2, 4, 8, 16}.
- Note: See Lists for more information on list operations.