フィルターのクリア

Use UICONTROL for listbox

8 ビュー (過去 30 日間)
Amanda
Amanda 2013 年 5 月 29 日
I need to use uicontrol to create a listbox. Instead of changing the variables each time the script is executed, I want to be able to change it on a GUI screen. So my list is composed of 5 variables:
mass
velocity
time
acceleration
speed
and these 5 variables have data.
Thanks,
Amanda

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 29 日
編集済み: Azzi Abdelmalek 2013 年 5 月 29 日
yourcell={'mass','velocity','time','acceleration','speed'}
uicontrol('Style', 'listbox','Position',[100 100 200 200],...
'string',yourcell,'Callback',@yourfunction)
%---------------add your function---------------------
function yourfunction(hObj,event)
v=get(hObj,'value')
%do
end
  1 件のコメント
Amanda
Amanda 2013 年 5 月 29 日
Thanks a lot.

サインインしてコメントする。

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