Difference between the arrays
1 回表示 (過去 30 日間)
古いコメントを表示
I have 2 arrays A= [1 2 3 4] and B = [2 3 4 5] representing paths in a graph. I want to find difference between the arrays. A-B =[1 2] and B-A = [4 5]. Can any one help. Thanks in advance.
2 件のコメント
Cyrus
2016 年 8 月 11 日
Hi,
Shouldn't A-B = [1] and B-A = [5] ?
to my understanding you want to keep the numbers that are not repeated in the other array, is that right?
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!