Load txt data into popupmenu
1 次查看(过去 30 天)
显示 更早的评论
Hello:
I have a txt like this:
1
2
3
4
And I would like to load this 4 lines into a popupmenu (popupmenu1).
How can I would do this??
Thanks for your attention.
2 个评论
采纳的回答
Azzi Abdelmalek
2013-11-21
a=num2cell((1:5)')
set(handles.popupmenu1,'string',a)
2 个评论
SYED AZHAR
2018-2-12
if u have text file like above and i want to populate into popup menu then how ?
Walter Roberson
2018-2-12
a = num2cell( load('TheTextFile.txt') );
set(handles.popupmenu1, 'string', a);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!