Main Content

Set Operations

Unions, intersection, set membership

Set operations compare the elements in two sets to find commonalities or differences. In MATLAB®, the sets are arrays of numbers, dates, times, or text data. Most set operations compare sets for exact equality, which can be problematic in the context of floating-point arithmetic. For that reason, theismembertoland大学quetolfunctions are also available to perform comparisons with a tolerance.

Funzioni

intersect Set intersection of two arrays
ismember Array elements that are members of set array
setdiff Set difference of two arrays
setxor Set exclusive OR of two arrays
大学on Set union of two arrays
大学que Unique values in array
ismembertol Members of set within tolerance
大学quetol Unique values within tolerance
join Combine two tables or timetables by rows using key variables
innerjoin Inner join between two tables or timetables
outerjoin Outer join between two tables or timetables

Argomenti