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 件のコメント

fauzan ishaq
fauzan ishaq 2017 年 1 月 21 日
i also search about that please tell hot to do that
Walter Roberson
Walter Roberson 2017 年 1 月 21 日
The Answer given below is fine.

サインインしてコメントする。

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 21 日

0 投票

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

2 件のコメント

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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by