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 Exchange에서 Data 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