Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
Nota del editor: This file was selected as MATLAB Central Pick of the Week
C = COUNTMEMBER(A,B) counts the number of times the elements of array A are present in array B, so that C(k) equals the number of occurences of A(k) in B. A may contain non-unique elements. C will have the same size as A.
A and B should be of the same type, and can be cell array of strings.
Examples:
countmember([1 2 1 3],[1 2 2 2 2])
-> 1 4 1 0
countmember({'a','b','c'},{'a','x','a'})
-> 2 0 0
Citar como
Jos (10584) (2026). countmember (https://es.mathworks.com/matlabcentral/fileexchange/7738-countmember), MATLAB Central File Exchange. Recuperado .
Información general
- Versión 2.1 (1,87 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
