Navigation

Operators and Keywords

Function List:

C++ API

: c = setdiff (a, b)
: c = setdiff (a, b, "rows")
: [c, ia] = setdiff (…)

Return the unique elements in a that are not in b sorted in ascending order.

If a is a row vector return a column vector; Otherwise, return a column vector. The inputs may also be cell arrays of strings.

If the optional input "rows" is given then return the rows in a that are not in b. The inputs must be 2-D matrices to use this option.

If requested, return the index vector ia such that c = a(ia).

See also: unique, union, intersect, setxor, ismember.

Package: octave