How to eliminate same strings in a cell-array?

2 Ansichten (letzte 30 Tage)
andrea
andrea am 23 Okt. 2014
Beantwortet: Star Strider am 23 Okt. 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!

Akzeptierte Antwort

Star Strider
Star Strider am 23 Okt. 2014
This works:
v = unique(h);

Weitere Antworten (0)

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by