フィルターのクリア

How can I use a switch in AppDesigner to call different functions?

11 ビュー (過去 30 日間)
xX_MatlabMaster_Xx
xX_MatlabMaster_Xx 2017 年 11 月 28 日
回答済み: Mukul Rao 2017 年 12 月 5 日
Hi,
I've got two functions in the callback of a button in appdesigner. Moreover I've got a toggle swtich that can have to states.
I want that, depending on the state of the switch, the button runs one of the functions. Would this work with a 'if' statement for the swtich value/state inside the button callback ? If yes, how?, If no, how as well?:)
Thank you very much!

採用された回答

Mukul Rao
Mukul Rao 2017 年 12 月 5 日
Hi, you can basically call one of the two functions within the button callback based on the state of the toggle switch (app.ToggleSwitch.Value). I've attached a very rudimentary example illustrating this.

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