<< moc_sumsq Matlab/Octave Compatibility toolbox moc_unwrap >>

Matlab/Octave Compatibility toolbox >> Matlab/Octave Compatibility toolbox > moc_unique

moc_unique

Return the unique elements of x, sorted in ascending order.

Calling Sequence

moc_unique (x)
moc_unique (x, "rows")
moc_unique (..., "first")
umoc_nique (..., "last")
[y, i, j] = moc_unique (...)

Description

If x is a row vector, return a row vector, but if x is a column vector or a matrix return a column vector.

If the optional argument "rows" is supplied, return the unique rows of x, sorted in ascending order.

If requested, return index vectors i and j such that x(i)==y and y(j)==x.

Additionally, one of "first" or "last" may be given as an argument. If "last" is specified, return the highest possible indices in i, otherwise, if "first" is specified, return the lowest. The default is "last".

See also

Authors


Report an issue
<< moc_sumsq Matlab/Octave Compatibility toolbox moc_unwrap >>