multisetdiff

like setdiff, but any repeated elements of A are removed only once for each time they occur in B
986 descargas
Actualizado 14 sep 2009

Ver licencia

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.

Citar como

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

Compatibilidad con la versión de MATLAB
Se creó con R2009a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Characters and Strings en Help Center y MATLAB Answers.
Agradecimientos

Inspirado por: lexcmp

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

added support for inf/nan values

1.0.0.0