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 Kommentare

fauzan ishaq
fauzan ishaq am 21 Jan. 2017
i also search about that please tell hot to do that
Walter Roberson
Walter Roberson am 21 Jan. 2017
The Answer given below is fine.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 21 Nov. 2013

0 Stimmen

a=num2cell((1:5)')
set(handles.popupmenu1,'string',a)

2 Kommentare

SYED AZHAR
SYED AZHAR am 12 Feb. 2018
if u have text file like above and i want to populate into popup menu then how ?
a = num2cell( load('TheTextFile.txt') );
set(handles.popupmenu1, 'string', a);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by