How can I remove duplicate values from cell array?
조회 수: 20 (최근 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에서 Multidimensional Arrays에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!