How to display cell contents in MATLAB GUI dropdown menu?
1 view (last 30 days)
Show older comments
GMD Baloch
on 27 Jan 2019
Commented: GMD Baloch
on 27 Jan 2019
Hello Everyone,
I have a GUI in which I want to display the entries of a 1-by-n cell as text in a dropdown menu as available options to select from. For example
webcamlist
ans =
cell
'USB2.0 PC CAMERA'
>> cam = webcam();
>> cam.AvailableResolutions
ans =
1×5 cell array
'640x480' '352x288' '320x240' '176x144' '160x120'
Now what I want to do is to display the contents of ans as string in a dropdown list in GUI. Can you help me?
0 Comments
Accepted Answer
Walter Roberson
on 27 Jan 2019
set(handles.TagOfYourDropdown, 'String', cam.AvailabelResolutions);
where handles.TagOfYourDropdown is the handle to your uicontrol('style', 'list')
More Answers (0)
See Also
Categories
Find more on Environment and Settings 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!