Impostazione delle operazioni
Le operazioni sugli insiemi confrontano gli elementi di due insiemi per trovare punti in comune o differenze. In MATLAB®, gli insiemi sono array di numeri, date, orari o dati di testo. La maggior parte delle operazioni sugli insiemi confronta gli insiemi per trovare l'uguaglianza esatta, che può risultare problematico nel contesto dell'aritmetica in virgola mobile. Per questo motivo, sono inoltre disponibili le funzioni ismembertol
e uniquetol
che consentono di eseguire confronti con una tolleranza.
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 |
union | Set union of two arrays |
unique | Unique values in array |
ismembertol | Members of set within tolerance |
uniquetol | 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
- Average Similar Data Points Using a Tolerance
This example shows how to average a group of points that are within tolerance. This approach produces a reduced data set that still holds the general shape of the original data.
- Group Scattered Data Using a Tolerance
This example shows how to group scattered data points based on their proximity to points of interest.