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

回答 (2 件)

bym
bym 2011 年 4 月 10 日

0 投票

unique(A,B)

1 件のコメント

Walter Roberson
Walter Roberson 2011 年 4 月 10 日
That would only work if B just happened to be the character vector 'rows' ...

サインインしてコメントする。

Walter Roberson
Walter Roberson 2011 年 4 月 10 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

タグ

質問済み:

2011 年 4 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by