Compare class type of two variables?

32 ビュー (過去 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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by