Use UICONTROL for listbox
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I need to use uicontrol to create a listbox. Instead of changing the variables each time the script is executed, I want to be able to change it on a GUI screen. So my list is composed of 5 variables:
mass
velocity
time
acceleration
speed
and these 5 variables have data.
Thanks,
Amanda
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 29 Mai 2013
Bearbeitet: Azzi Abdelmalek
am 29 Mai 2013
yourcell={'mass','velocity','time','acceleration','speed'}
uicontrol('Style', 'listbox','Position',[100 100 200 200],...
'string',yourcell,'Callback',@yourfunction)
%---------------add your function---------------------
function yourfunction(hObj,event)
v=get(hObj,'value')
%do
end
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!