Man Scilab

unique
Scilab Function

unique - extract unique components of a vector

Calling Sequence

[N, [k]]=unique(M)

Parameters

Description

unique(M) returns a vector which retains the unique entries of M in ascending order.

If required the output argument k contains the position of the first encountered unique entries.

Examples


M=round(2*rand(20,1));

unique(M)
[N,k]=unique(M)

unique(string(M))
[N,k]=unique(string(M))

 
  

See Also

union ,   sort ,   lex_sort ,  

Back