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!