checking of existing an string in a cell arrays

조회 수: 751 (최근 30일)
mohammad
mohammad 2011년 9월 21일
댓글: Visweswar Bulusu 2020년 6월 27일
There is a cell in name of 'CELL'. it is 1*12000 . its needed to check being and existing of a specified string in arrays of 'CELL'. so if the string doesn't exist do something
for example:
CELL={'a','b','c','d',...};
if 'a' not exists in CELL
do something
end

채택된 답변

Lucas García
Lucas García 2011년 9월 21일
if ~any(strcmp(CELL,'a'))
% Do Something
else
% Do Something else
end
  댓글 수: 4
mohammad
mohammad 2011년 9월 21일
Thanks a lot
Visweswar Bulusu
Visweswar Bulusu 2020년 6월 27일
Thanks ...useful

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by