Setting numeric values in Pop-up Menu in Matlab Guide

2 ビュー (過去 30 日間)
pavikirthi
pavikirthi 2015 年 10 月 28 日
コメント済み: pavikirthi 2015 年 10 月 28 日
How to set numeric values from 1 to 10 in Pop-up menu and how to use this value from Pop-up Menu to Push Button when selected in Matlab Guide?

採用された回答

Image Analyst
Image Analyst 2015 年 10 月 28 日
To load the popup with numbers:
listItems = cell(10,1);
for k = 1 : 10
listItems{k} = num2str(k);
end
set(handles.popup1, 'String', listItems);
To get the index of the selected item:
get(handles.popup1, 'Value');

その他の回答 (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