How can I remove duplicate values from cell array?
29 ビュー (過去 30 日間)
古いコメントを表示
I have this problem
S={ 1 2, 2 3 }
how delete duplicate value:
S becomes {1 2 3 }
0 件のコメント
採用された回答
Nicolas B.
2019 年 11 月 11 日
編集済み: Nicolas B.
2019 年 11 月 11 日
So in your case, because you have a cell array:
S = {1 2 2 3};
S = num2cell(unique(cell2mat(S)));
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!