compare arrays

I have two arrays. I want to compare array A with B to see which element is in A and not in B and vice versa. Please help

Antworten (2)

bym
bym am 10 Apr. 2011

0 Stimmen

unique(A,B)

1 Kommentar

Walter Roberson
Walter Roberson am 10 Apr. 2011
That would only work if B just happened to be the character vector 'rows' ...

Melden Sie sich an, um zu kommentieren.

Walter Roberson
Walter Roberson am 10 Apr. 2011

0 Stimmen

setdiff(A,B)
and
setdiff(B,A)

Kategorien

Mehr zu Data Types finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 10 Apr. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by