How can I query the content of a cell?
1 次查看(过去 30 天)
显示 更早的评论
How can I query the content ( in a loop) of a cell (40*1 double)? I want to ask if the content is 0 or is empty or NaN or []? I want to query these three things "options/cases" separately. Thank you for your help of this big problem for me. Wishing you a nice day.
0 个评论
回答(1 个)
Rik
2020-5-25
The same way you get the contents of any cell array: use curly braces.
YourCell{n}==0
isnan(YourCell{n})
isempty(YourCell{n})
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!