MYUNIQUE

버전 1.0.0.0 (1.43 KB) 작성자: Mehmet OZTURK
finds uniqe entries, indices and number of occurances of the unique elements
다운로드 수: 2.4K
업데이트 날짜: 2007/6/20

라이선스 보기

MYUNIQUE is a function to find unique elements in a numeric vector in the order in which they appear first or last which is determined by "mode" (default is first). The function is also outputs the indices "ndx" of unique elements and number of occurances of that elements in "h".

% Example:
% >> a=[9 3 6 2 7 1 2 1 1 1 9 9 3 3];
% >> [b ndx h]=myunique(a)
% b =
%
% 9 3 6 2 7 1
% ndx =
%
% 1 2 3 4 5 6
% h =
%
% 3 3 1 2 1 4
%
% >> myunique(a,'last')
% ans =
%
% 6 7 2 1 9 3

인용 양식

Mehmet OZTURK (2024). MYUNIQUE (https://www.mathworks.com/matlabcentral/fileexchange/15242-myunique), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Time-Domain Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

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

Added property to find number of occurances.