Reading text in a cell array

1 visualización (últimos 30 días)
hasan alhussaini
hasan alhussaini el 13 de Mzo. de 2018
Respondida: per isakson el 13 de Mzo. de 2018
Hey!
Basically i have a variable called imagetype1, that is a 1x1 cell. that tells gives me a category type such as flowers,dogs,sheep,camels,sky etc i'm trying to do an IF statement. my code is the following if imagetype1 == 'flowers'
but i keep getting the following error "Undefined operator '==' for input arguments of type 'cell'."
i'm basically trying to say if the 1x1 cell in imagetype1 is flowers then do the following statement. any ideas? thanks

Respuestas (1)

per isakson
per isakson el 13 de Mzo. de 2018
if strcmp( imagetype1, 'flowers' ) % recommended

Categorías

Más información sobre Cell Arrays 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