How to set handles on multiple figures using loop?
3 次查看(过去 30 天)
显示 更早的评论
for
set(handles.edit(from 1 to 100),'Visible','off')
end
0 个评论
采纳的回答
Walter Roberson
2015-9-26
set(handles.edit(1:100),'Visible','off')
Question: is handles.edit vector of length 100, or do you have handles.edit1, handles.edit2, handles.edit3, and so on up to 100? If you do, then are those handles the only uicontrol of style edit or are there a small number of others or are there a bunch of others?
5 个评论
Walter Roberson
2015-9-26
Aggh! Use dynamic field names not eval()
set(handles.(sprintf('edit%d', i)), 'visible', 'off')
更多回答(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!