When using listdlg to create a menu, how do you access the user input?
Ältere Kommentare anzeigen
I'm writing a script which gives the user 10 coundries of which they must pick 2. I'm using listdlg for the menu, but how do I view/display their choices?
This is what I've got so far...
cList = {'United Kingdom','Bulgaria','Germany','Greece','Sweden','Netherlands','Spain','Romania','Luxembourg','Poland'};
[indx,tf] = listdlg('PromptString','Select 2 countries to study','ListString',cList);
the variable indx gives the number of the countries selected (eg UK=1,Bulgaria=2...), and cList is a 1x10 cell
Thanks in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!