Problem with ''if''
11 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone, I have this variable:
values =
[] [1x27 char] [1x32 char] [1x28 char] [1x34 char]
and i want have a check for empty cells. I use :
if values[ ]==[ ]
....
end
But unfortunately....
??? Conversion to logical from cell is not possible. What can i do???
0 件のコメント
採用された回答
Robert Cumming
2011 年 7 月 20 日
cellfun ( @isempty, values )
5 件のコメント
Oleg Komarov
2011 年 7 月 20 日
idx = cellfun('isempty',values);
find(~idx,1,'first')
Finds the location of the first non-empty.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!