how remove duplicate rows ?
6 ビュー (過去 30 日間)
古いコメントを表示
I dont knew if we can have a script for that if we have
A=[ 1,2,3;
42,0,1;
14,2,4;
2,3,5;
1,0,0]
B=[42,0,1;
1,0,0]
i want C
C=[ 1,2,3;
14,2,4;
2,3,5]
thanks
1 件のコメント
the cyclist
2014 年 5 月 21 日
編集済み: the cyclist
2014 年 5 月 21 日
Note that the difference between my answer and Andrei's is how to handle the case where there are rows in B that are not in A. My solution will include those rows in C, and Andrei's will not.
Azzi's is different still, in that it handles replicated rows from A differently. My and Andrei's solution will keep only the unique rows, while Azzi's will keep duplicate rows from A.
回答 (3 件)
the cyclist
2014 年 5 月 21 日
編集済み: the cyclist
2014 年 5 月 21 日
C = setxor(A,B,'rows','stable')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Automated Driving Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!