multisetdiff

버전 1.1.0.0 (2.57 KB) 작성자: Ben Petschel
like setdiff, but any repeated elements of A are removed only once for each time they occur in B
다운로드 수: 986
업데이트 날짜: 2009/9/14

라이선스 보기

setdiff for multisets. multisetdiff(A,B) removes repeated elements of A only once for each time they occur in B.

Example:
multisetdiff([1,1,2,2],[1,1,2]) % returns 2

To work with cell arrays of strings or using the rows feature this version requires LEXCMP (see below). The current version does not work for non-string cell arrays (unless you have an implementation of SORT for cell arrays). Non-cell arrays can in principle be any objects for which SORT, SIGN, MINUS and comparison operations are defined.

See the help for more details.

인용 양식

Ben Petschel (2024). multisetdiff (https://www.mathworks.com/matlabcentral/fileexchange/25267-multisetdiff), MATLAB Central File Exchange. 검색됨 .

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

받음: lexcmp

Community Treasure Hunt

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

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

added support for inf/nan values

1.0.0.0