MATLAB Answers

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

18 views (last 30 days)
UDITA PANT on 15 Apr 2019
Commented: UDITA PANT on 15 Apr 2019
% 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'.


Sign in to comment.

Accepted Answer

Dennis on 15 Apr 2019
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;

More Answers (0)

Sign in to answer this question.

Translated by