Any master willing to guide a beginner to code the app of 2 input and lamp as output (appdesigner)?

4 ビュー (過去 30 日間)
The condition is either input entry is >= 10, then the lamp will turn Red, otherwise turn green.
Your kindness will be deeply appreciated and paid it forward.

採用された回答

Kevin Chng
Kevin Chng 2018 年 10 月 11 日
編集済み: Kevin Chng 2018 年 10 月 11 日
Hi engchai Ang,
I guess you have tried your best to do it. Refer to my code, paste this code in your callback function
a = app.Input1EditField.Value;
b = app.Input2EditField.Value;
if a>=10 || b>=10
app.Lamp.Color = [1 0 0]
else
app.Lamp.Color = [0 1 0]
end
However, I have attached a .m file for you.
.mlapp file is not allowed to be uploaded here. Hence, i copy the code and paste it in .m file for you.
  1 件のコメント
Andrew Ang
Andrew Ang 2018 年 10 月 12 日

Kevin Chng, A Million thanks for your thoughtfulness and kindness. Wish you and your beloved one are always with pleasant sunshine.

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

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