필터 지우기
필터 지우기

Compare class type of two variables?

조회 수: 19 (최근 30일)
Najmeh Eskandari
Najmeh Eskandari 2019년 2월 9일
편집: madhan ravi 2019년 2월 9일
Hi.
I want to check the h class and then if is cell print something.I write the code:
L0={[0,0],[0,0],[.5,.51,.5,.51,.5,.51],[0]};
h=L0{1};
stuff=class(h);
if stuff~='cell'
w=8;
end
but it is wrong.
Thanks if you guide me.are

채택된 답변

madhan ravi
madhan ravi 2019년 2월 9일
편집: madhan ravi 2019년 2월 9일
if ~isa(h,'cell') % you don’t need the line stuff

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by