Azzera filtri
Azzera filtri

Load Column Data in Popup Menu Guide

1 visualizzazione (ultimi 30 giorni)
Amanda
Amanda il 2 Set 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

Risposta accettata

Sven
Sven il 2 Set 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]);

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by