checking of existing an string in a cell arrays

조회 수: 1,104(최근 30일)
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
Visweswar Bulusu
Visweswar Bulusu 2020년 6월 27일
Thanks ...useful

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

추가 답변(0개)

범주

Find more on Characters and Strings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by