dash.is.uniqueSet

Test if input has repeated elements


Syntax



Description

tf = dash.is.uniqueSet(X)

Returns true if a vector contains repeated values. Otherwise, returns false.

tf = dash.is.uniqueSet(X, true)

Returns true if a matrix contains repeated rows. Otherwise, returns false.

[tf, repeat] = dash.is.uniqueSet(…)

Also returns the indices to the first set of repeated values.


Input Arguments

X

vector | matrix
The input being tested

Output Arguments

tf

scalar logical
True if X has repeated values. Otherwise, false

repeat

vector, linear indices
The indices of the first set of repeated values.