Filter löschen
Filter löschen

Load Column Data in Popup Menu Guide

1 Ansicht (letzte 30 Tage)
Amanda
Amanda am 2 Sep. 2012
I have a two column text file:
A.txt
Winter Temp Summer Temp
23 78
43 87
34 90
23 99
I want to download the Winter Temp Data in popup_menu_Winter and
Summer Temp Data in popup_menu_Summer. So the popup_menu_Winter will
display the data values:
23
43
34
23
And the same for Summer Temp.
Thanks,
Amanda

Akzeptierte Antwort

Sven
Sven am 2 Sep. 2012
Hi Amanda,
fid = fopen('A.txt');
datas = textscan(fid,'%f %f','headerlines',1);
fclose(fid);
figure
winterHandle = uicontrol('Style','popupmenu','String', datas(1),'Position',[0 0 60 20]);
summerHandle = uicontrol('Style','popupmenu','String', datas(2),'Position',[100 0 60 20]);
  1 Kommentar
Amanda
Amanda am 2 Sep. 2012
Sven,Thanks.
I have been at this for awhile.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help 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