How to eliminate same strings in a cell-array?

2 visualizaciones (últimos 30 días)
andrea
andrea el 23 de Oct. de 2014
Respondida: Star Strider el 23 de Oct. de 2014
Thi is my cell-array:
h={'a','b','c','a','d'};
How to eliminate one of two equal strings like 'a' in the example and get a result like this:
v={'a','b','c','d'};
Thanks in advance for your help!

Respuesta aceptada

Star Strider
Star Strider el 23 de Oct. de 2014
This works:
v = unique(h);

Más respuestas (0)

Categorías

Más información sobre Cell Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by