Compare class type of two variables?

31 次查看(过去 30 天)
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 中查找有关 Whos 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by