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
2011-4-10
unique(A,B)
1 个评论
Walter Roberson
2011-4-10
That would only work if B just happened to be the character vector 'rows' ...
Walter Roberson
2011-4-10
setdiff(A,B)
and
setdiff(B,A)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!