Borrar filtros
Borrar filtros

Load Column Data in Popup Menu Guide

1 visualización (últimos 30 días)
Amanda
Amanda el 2 de Sept. de 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

Respuesta aceptada

Sven
Sven el 2 de Sept. de 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 comentario
Amanda
Amanda el 2 de Sept. de 2012
Sven,Thanks.
I have been at this for awhile.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by