Eliminating duplicated values in a cell Array
1 回表示 (過去 30 日間)
古いコメントを表示
My cel Array looks as such:
S = {'ABS' ; 'First'; 'input'; 'ABS'}
it is a column array instead of a row. I want to eliminate any and all duplicate values in the cell array. I tried the unique function with and without cell2mat and I am getting an error both ways. What is the best way I can go about eliminating duplicate values in my cell array?
0 件のコメント
回答 (1 件)
KALYAN ACHARJYA
2020 年 3 月 4 日
編集済み: KALYAN ACHARJYA
2020 年 3 月 4 日
S = {'ABS' ; 'First'; 'input'; 'ABS'};
result=unique(S)
result
result =
3×1 cell array
'ABS'
'First'
'input'
参考
カテゴリ
Help Center および File Exchange で General Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!