Difference between revisions of "Unique Command"

From GeoGebra Manual
Jump to: navigation, search
Line 4: Line 4:
 
:Returns list of elements of list L in ascending order, repetitive elements are included only once. Works for both a list of numbers and a list of text.  See also the [[Frequency Command|Frequency command]].
 
:Returns list of elements of list L in ascending order, repetitive elements are included only once. Works for both a list of numbers and a list of text.  See also the [[Frequency Command|Frequency command]].
 
:{{example|1=<div>
 
:{{example|1=<div>
:* <code><nowiki>Unique[{1, 2, 4, 1, 4}]</nowiki></code> yields "{1, 2, 4}".  
+
:* <code><nowiki>Unique[{1, 2, 4, 1, 4}]</nowiki></code> yields ''{1, 2, 4}''.  
 
:* <code><nowiki>Unique[{"a", "b", "Hello", "Hello"}]</nowiki></code> yields ''{"'Hello", "a", "b"}''.</div>}}
 
:* <code><nowiki>Unique[{"a", "b", "Hello", "Hello"}]</nowiki></code> yields ''{"'Hello", "a", "b"}''.</div>}}
 
==CAS Syntax==
 
==CAS Syntax==

Revision as of 11:37, 6 September 2011



Unique[ <List L> ]
Returns list of elements of list L in ascending order, repetitive elements are included only once. Works for both a list of numbers and a list of text. See also the Frequency command.
Example:
  • Unique[{1, 2, 4, 1, 4}] yields {1, 2, 4}.
  • Unique[{"a", "b", "Hello", "Hello"}] yields {"'Hello", "a", "b"}.

CAS Syntax

Unique[ <List L> ]
Returns a list where each element of L occurs only once.
Example:
Unique[{1, x, x, 1, a}] yields {1, x, a}.
© 2024 International GeoGebra Institute