Similar to unique, how can i use for case insenisitive

조회 수: 16 (최근 30일)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2015년 6월 25일
댓글: Gopalakrishnan venkatesan 2015년 6월 25일
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

채택된 답변

Jan
Jan 2015년 6월 25일
편집: Jan 2015년 6월 25일
a = { 'abc' , 'aBc' , 'xyz' , 'Xyz'};
[dummy, ia] = unique(lower(a));
result = a(ia);
  댓글 수: 3
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2015년 6월 25일
will that be possible
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2015년 6월 25일
its working thank u

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by