MEMBERSHIP

Version 1.0.0.0 (595 octets) par Mukhtar Ullah
Membership of elements of one array in another.
1,8K téléchargements
Mise à jour 7 juin 2005

Aucune licence

MEMBERSHIP counts membership of elements of one array in another.

C = MEMBERSHIP(A,B) for the array A returns an array of the same size as A containing the number of instances of the elements of A in the array B. A and B can be character arrays or cell arrays of strings.

Examples:
membership(1:6,pascal(3)) returns [5 1 2 0 0 1]
membership('MASK','MISSISSIPI') retruns [1 0 4 0]
membership({'john','gul';'sim','ku'},{'sim','gul','kid','gul'}) returns
[0 2;1 0]

See also FREQTABLE, ISMEMBER

Citation pour cette source

Mukhtar Ullah (2024). MEMBERSHIP (https://www.mathworks.com/matlabcentral/fileexchange/7796-membership), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R14
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Characters and Strings dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0

a check included