フィルターのクリア

How to display cell contents in MATLAB GUI dropdown menu?

5 ビュー (過去 30 日間)
GMD Baloch
GMD Baloch 2019 年 1 月 27 日
コメント済み: GMD Baloch 2019 年 1 月 27 日
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?

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by