Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Set difference of two arrays

returns
the data in `C`

= setdiff(`A,B`

)`A`

that is not in `B`

,
with no repetitions. `C`

is in sorted order.

If

`A`

and`B`

are tables or timetables, then`setdiff`

returns the rows from`A`

that are not in`B`

. For timetables,`setdiff`

takes row times into account to determine equality, and sorts the output timetable`C`

by row times.

Was this topic helpful?