How to eliminate same strings in a cell-array?

조회 수: 2 (최근 30일)
andrea
andrea 2014년 10월 23일
답변: Star Strider 2014년 10월 23일
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