remove the repeating values in array
古いコメントを表示
i have an array with 2 rows 9 columns values
29 29 29 29 25 25 29 29 27
13 13 13 13 14 14 13 13 19
i wanted to remove the repeating values and get the output as
29 25 27
13 14 19
what code should i write to remove the repeated values?? please do reply....
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2013 年 11 月 28 日
a=[29 29 29 29 25 25 29 29 27;
13 13 13 13 14 14 13 13 19];
b=a'
[ii,jj]=unique(a','rows')
out=b(sort(jj),:)'
3 件のコメント
Elysi Cochin
2013 年 11 月 28 日
Elysi Cochin
2013 年 11 月 28 日
Azzi Abdelmalek
2013 年 11 月 28 日
It's in that order
カテゴリ
ヘルプ センター および File Exchange で Shifting and Sorting Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!