Unique for cell array of string

버전 1.1.0.0 (1.05 KB) 작성자: Wei-Rong Chen
This function 'uniqueStrCell' performs 'unique' for cell array of string.
다운로드 수: 755
업데이트 날짜: 2015/4/14

라이선스 보기

The built-in 'UNIQUE' function in MATLAB will report errors if the input cell contains different types of variables.
% This function 'uniqueStrCell' performs 'UNIQUE' for cell array of string.
% The output cell 'out' will include only string cells and numeric cells converted to strings
% , and exclude NaN and empty cells.
% Example:
% inputStrCell={'ek','wekf', 29, NaN, [],'we'};
% out = uniqueStrCell(inputStrCell);
% >> out = {'ek' 'we' 'wekf' '29'}
%
% Acknowledgement:
% This function greatly benefits from Jan Simon's comments. The previous version was errorful.
% See 'unique' for more information

인용 양식

Wei-Rong Chen (2024). Unique for cell array of string (https://www.mathworks.com/matlabcentral/fileexchange/50476-unique-for-cell-array-of-string), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Update greatly benefits from Jan Simon's comments.

1.0.0.0