Similar to unique, how can i use for case insenisitive

16 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Jan
Jan el 25 de Jun. de 2015
Editada: Jan el 25 de Jun. de 2015
a = { 'abc' , 'aBc' , 'xyz' , 'Xyz'};
[dummy, ia] = unique(lower(a));
result = a(ia);
  3 comentarios
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan el 25 de Jun. de 2015
will that be possible

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numbers and Precision en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by