Effacer les filtres
Effacer les filtres

How to display cell contents in MATLAB GUI dropdown menu?

5 vues (au cours des 30 derniers jours)
GMD Baloch
GMD Baloch le 27 Jan 2019
Commenté : GMD Baloch le 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?

Réponse acceptée

Walter Roberson
Walter Roberson le 27 Jan 2019
set(handles.TagOfYourDropdown, 'String', cam.AvailabelResolutions);
where handles.TagOfYourDropdown is the handle to your uicontrol('style', 'list')

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by