Setting numeric values in Pop-up Menu in Matlab Guide
4 次查看(过去 30 天)
显示 更早的评论
How to set numeric values from 1 to 10 in Pop-up menu and how to use this value from Pop-up Menu to Push Button when selected in Matlab Guide?
0 个评论
采纳的回答
Image Analyst
2015-10-28
To load the popup with numbers:
listItems = cell(10,1);
for k = 1 : 10
listItems{k} = num2str(k);
end
set(handles.popup1, 'String', listItems);
To get the index of the selected item:
get(handles.popup1, 'Value');
更多回答(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!