Detecting an empty uitable
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I am developing a GUI which has several editable tables that correspond to optional parameters. I'm looking for a way to detect if the user has left the table empty. I tried using something like this:
data=get(handles.TestTable,'Data');
if data
disp('data is here')
else
disp('no data found')
end
But this gave the error 'Conversion to logical from cell is not possible.' Any help on how to handle this would be much appreciated.
0 个评论
采纳的回答
更多回答(1 个)
John
2012-7-10
try the command "isempty"
for example:
if isempty(data) == 0
disp('data is here')
else
disp('data is not here')
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!