set handles function for char data.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
%I have a data which class is char. I need to write this data into listbox in my GUI.
tp=0.99954;
scale_ppm=(tp-1)*10^6 %ppm
scale=sprintf('scale %10.4f ppm \n',scale_ppm) %char
%I want to assign "scale" into listbox in my GUI. Which function I need to use?
thanks in advance.
1 Kommentar
Akzeptierte Antwort
David Sanchez
am 18 Jul. 2013
Your listbox has to have a tag assigned (look for it in the property inspector). The values you want to insert into your listbox should be part of a cell array.
scales = cell(num_elements,1);
for k=1:num_elements
scales{k} = your_strings_here;
end
set(handles.your_pop,'String',scales);
4 Kommentare
Jan
am 19 Jul. 2013
Simply try it, sermet. You will find out, that the same code is working for all kinds of uicontrol's (while I'd avoid multi-line text checkboxes).
Weitere Antworten (0)
Siehe auch
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!