필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

eliminate duplicate in a cell

조회 수: 2 (최근 30일)
ben zekri raouf
ben zekri raouf 2015년 2월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi ,im asking if there is a way to eliminate the dublicate,so the result must be('eight two lions') .Any help is greatly appreciated.
>> a
a =
'الأسود إثنان' ('two lions')
>> b
b =
'الأسود ثمانية' ('eight lions')
>> class(a)
ans =
cell
>> class(b)
ans =
cell
>> strcat(b,{' '},a)
ans =
'الأسود ثمانية الأسود إثنان' ('eight lions two lions)
  댓글 수: 2
Elias Gule
Elias Gule 2015년 2월 19일
c = [a ' ' b]; c = unique(regexp([c{:}],'\s+','split'));
tmp = c(2); c(2) = c(3); c(3) = tmp;
ben zekri raouf
ben zekri raouf 2015년 2월 19일
it works really good,thank you so much :)

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by