appdesigner, choosing from dropdown different functions

1 回表示 (過去 30 日間)
Furkan Karaman
Furkan Karaman 2022 年 10 月 5 日
回答済み: J. Alex Lee 2022 年 10 月 5 日
Hello,
I want to create a simple app in appdesigner in which i can choose from a dropdown menu different functions which are stored in scripts.
If I then click on a Startbutton the selected function should be applied.
I created a private property
properties (Access = private)
val ;
end
function DropDownValueChanged(app, event)
gh = app.DropDown.Value;
app.val=gh;
function StartButtonPushed(app, event)
if (app.val==(someText))
someMatlabscript;
end
An error is not shown but it does not work.

採用された回答

J. Alex Lee
J. Alex Lee 2022 年 10 月 5 日
I suspect your problem is that your conditional is flawed. To test, put in an "else" to check if your conditional is not being met.
Does "app.val" return as a string or character array, and in your conditional do you use string or character array? If mixed, you would not error out and conditional would not be met.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by