How to eliminate same strings in a cell-array?

1 次查看(过去 30 天)
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!

采纳的回答

Star Strider
Star Strider 2014-10-23
This works:
v = unique(h);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by