Scilab Reference Manual |
---|
unique — extract unique components of a vector
[N, [k]]=unique(M)
M | : vector of real numbers or strings |
N | : vector of real numbers or strings |
k | : vector of integers |
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.
M=round(2*rand(20,1)); unique(M) [N,k]=unique(M) unique(string(M)) [N,k]=unique(string(M))
<< union | vectorfind >> |