Difference of cell arrays containing strings
Afficher commentaires plus anciens
Hello everybody,
I try to calculate the difference of two cell arrays containing strings. I want to identify the unique strings which are only present in one of the cell arrays. Here is an example:
Cell1 = {'Joe', 'Ralph', 'Sandra'};
Cell2 = {'Joe', 'Sandra'};
I now want to calculate Cell3 containing the "difference" of these two arrays, that means Cell3 should be equal to {'Ralph'}. For simplicity it could be assumed that all components of Cell2 are also components of Cell1. I want to identify the extra components in Cell1.
Any ideas? Thank you very much!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!