uniqueCellGeneraliz​ed(A)

버전 1.2.0.0 (3.19 KB) 작성자: Dave Stanley
Unique elements in cell array containing mixed-type elements
다운로드 수: 37
업데이트 날짜: 2017/5/30

라이선스 보기

[C,ia,ic] = uniqueCellGeneralized(A)
Same as the built in unique function, but works for cell arrays containing any type of data or a mixture of different data types (e.g. numerics, strings, function handles, objects, etc)

Example 1:
A = {{'a','b','c'}, {'a','b','c'}, {'d','e','f'}};
[C,ia,ic] = uniqueCellGeneralized(A)

Result1:
C = {{'a','b','c'}, {'d','e','f'}};
ia = [1 3]
ic = [1 1 2]

Example 2:
A = {{'a','b','c'},{'a','b','c'},{'d','e','f'},{@plot},{52},{51},{52}};
[C,ia,ic] = uniqueCellGeneralized(A)

Result 2:
C = {{'a','b','c'}, {'d','e','f'}, {@plot}, {52}, {51}};
ia = [1 3 4 5 6]
ic = [1 1 2 3 4 5 4]

인용 양식

Dave Stanley (2026). uniqueCellGeneralized(A) (https://kr.mathworks.com/matlabcentral/fileexchange/63177-uniquecellgeneralized-a), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Tables에 대해 자세히 알아보기
태그 태그 추가
도움

도움 받은 파일: Unique elements in cell array

도움 준 파일: uniqueCells

버전 게시됨 릴리스 정보
1.2.0.0

Updated text

1.1.0.0

Added examples

1.0.0.0