I am trying to add two numbers in App designer code view and i am getting following error message

1 回表示 (過去 30 日間)
% Callback function: Button, EditField3
function ButtonPushed(app, event)
a = app.EditField;
b = app.EditField2;
c= a + b;
app.EditField3 = c;
I am getting the following error.
Undefined function 'plus' for input arguments of type 'matlab.ui.control.NumericEditField'.

採用された回答

Dennis
Dennis 2019 年 4 月 15 日
You need to access the value stored in your edit fields:
a = app.EditField.Value;
b = app.EditField2.Value;
c= a + b;
app.EditField3.Value = c;
  2 件のコメント
UDITA PANT
UDITA PANT 2019 年 4 月 15 日
Thank you so much!
I am really new to this...
Joriel Jade Festin
Joriel Jade Festin 2022 年 5 月 31 日
how to create a button that can multiply 2 polynomials

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

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