Function Reference
— Function File: setdiff (a, b)
— Function File: setdiff (a, b, "rows")
— Function File: [c, i] = setdiff (a, b)

Return the elements in a that are not in b, sorted in ascending order. If a and b are both column vectors return a column vector, otherwise return a row vector.

Given the optional third argument ‘"rows"’, return the rows in a that are not in b, sorted in ascending order by rows.

If requested, return i such that c = a(i).