How can I take two inputs from the same variable

2 ビュー (過去 30 日間)
Kiat Tsen Lim
Kiat Tsen Lim 2021 年 5 月 29 日
コメント済み: Kiat Tsen Lim 2021 年 6 月 1 日
Hi good day to all of you, I'm currently working on an app to plot a graph based on certain value inserted. For value fo, the user have choice to use the slider to select the values they want or input their own values within the limit of 4 to 36. When it comes to the coding part, how can I take either both values and yet assign to the same variable which is fo, so far I've assigned fo to both of them but one of it doesn't work, is there a better way to do this ?

採用された回答

Matt J
Matt J 2021 年 5 月 29 日
編集済み: Matt J 2021 年 5 月 29 日
When the Slider is moved, its callback will be invoked. You should set the EditField value in the callback to keep them consistent. Similarly, when then EditField callback is invoked, you should adjust the Slider values.
  8 件のコメント
Adam Danz
Adam Danz 2021 年 5 月 31 日
I suggest using one callback function for both objects. You can use the event input to determine which object was changed and the function will merely update the other object.
Kiat Tsen Lim
Kiat Tsen Lim 2021 年 6 月 1 日
thanks for the help! I got it now

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by