why my change on edit value (text) command doesnt work

i have a problem when i want try to change the edit field value using if it seem doesnt work.
if bbox==Bug(i)
app.EditField.Value = 'there is a pet';
elseif box==bug(detectedImg)
app.EditField.Value = 'there is a pet';
else
app.EditField.Value = 'there isno pet';
end
end
i have attach the file too, because it show an error message and wont even let me run the program

回答 (1 件)

Rashed Mohammed
Rashed Mohammed 2020 年 11 月 26 日

0 投票

Hi Timothy
The code you have attached has 2 main errors due to which the app is not running and is giving errors.
  1. There is an extra end keyword after the if-elseif-else-end code.
  2. if bbox == Bug(i), here i should be capital.
Hope this helps.

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

製品

リリース

R2020b

質問済み:

2020 年 11 月 23 日

回答済み:

2020 年 11 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by