How can I remove duplicate values from cell array?
10 次查看(过去 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 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!