checking of existing an string in a cell arrays

500 visualizaciones (últimos 30 días)
mohammad
mohammad el 21 de Sept. de 2011
Comentada: Visweswar Bulusu el 27 de Jun. de 2020
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

Respuesta aceptada

Lucas García
Lucas García el 21 de Sept. de 2011
if ~any(strcmp(CELL,'a'))
% Do Something
else
% Do Something else
end
  4 comentarios
mohammad
mohammad el 21 de Sept. de 2011
Thanks a lot
Visweswar Bulusu
Visweswar Bulusu el 27 de Jun. de 2020
Thanks ...useful

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by