Compare class type of two variables?
28 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Najmeh Eskandari
am 9 Feb. 2019
Bearbeitet: madhan ravi
am 9 Feb. 2019
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
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 9 Feb. 2019
Bearbeitet: madhan ravi
am 9 Feb. 2019
if ~isa(h,'cell') % you don’t need the line stuff
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!