Reading text in a cell array

조회 수: 1 (최근 30일)
hasan alhussaini
hasan alhussaini 2018년 3월 13일
답변: per isakson 2018년 3월 13일
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

답변 (1개)

per isakson
per isakson 2018년 3월 13일
if strcmp( imagetype1, 'flowers' ) % recommended

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by