Similar to unique, how can i use for case insenisitive

16 vues (au cours des 30 derniers jours)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan le 25 Juin 2015
For example I have cell array a = { 'abc' , 'aBc' , 'xyz' , 'Xyz'}
now i need to remove the duplication.
As unique is the case sensitive, it returns the whole array.
how can i do it?
Thank you

Réponse acceptée

Jan
Jan le 25 Juin 2015
Modifié(e) : Jan le 25 Juin 2015
a = { 'abc' , 'aBc' , 'xyz' , 'Xyz'};
[dummy, ia] = unique(lower(a));
result = a(ia);
  3 commentaires
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan le 25 Juin 2015
will that be possible
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan le 25 Juin 2015
its working thank u

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by