How can I remove duplicate values from cell array?
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have this problem
S={ 1 2, 2 3 }
how delete duplicate value:
S becomes {1 2 3 }
0 commentaires
Réponse acceptée
Nicolas B.
le 11 Nov 2019
Modifié(e) : Nicolas B.
le 11 Nov 2019
So in your case, because you have a cell array:
S = {1 2 2 3};
S = num2cell(unique(cell2mat(S)));
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!