Effacer les filtres
Effacer les filtres

Load Column Data in Popup Menu Guide

1 vue (au cours des 30 derniers jours)
Amanda
Amanda le 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

Réponse acceptée

Sven
Sven le 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 commentaire
Amanda
Amanda le 2 Sep 2012
Sven,Thanks.
I have been at this for awhile.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by