When using listdlg to create a menu, how do you access the user input?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!