Calculating limits, derivatives, and integrals in AppDesigner

9 views (last 30 days)
Hello, I have a task to write a user interface for calculating limits, derivatives, and integrals.
In each function there is some problem because of which the GUI can not work completely on the user-defined data.
In the usual Matlab command line, everything works flawlessly, but in AppDesigner it does not work.
If someone knows how to do this, please explain.
For input data i'm use text fields.
Here's what I have:
function CalculateButtonPushed(app, event)
syms x
Error: Undefined function 'int' for input arguments of type 'char'.
function limcalcButtonPushed(app, event)
syms x
y=app.limitEditField.Value; %(x^3 + 5)/(x^4 + 7)
lim = limit(y);
Error: Undefined function 'limit' for input arguments of type 'char'.
function divCalcButtonPushed(app, event)
syms x
f = 3*x^2 + 2*x^(-2);
f = diff(f);
Error using matlab.ui.control.EditField/set.Value (line 98)
'Value' must be a character vector or a string scalar.
Thank you.
  1 Comment
rony guzman
rony guzman on 12 Sep 2022 at 15:31
envia el archivo del codigo que utilizaste, me serviria.

Sign in to comment.

Answers (1)

Reshma Nerella
Reshma Nerella on 31 Jan 2021
There are two types of Edit Fields, one for Numeric values and the other one is for text.
If you try to store or retreive values from a from Edit Field(text), it will of type 'char'.
I think you are using Edit Feild(text) for downEditField, upEditField.
Convert the data type to the ones the functions(like int) support and then pass them as arguments
Since 'int' function doesn't take 'char' as input, it is showing you the error
Undefined function 'int' for input arguments of type 'char'.
For more information on Edit Field refer to the documentation page: uieditfield
Hope this helps!!

Community Treasure Hunt

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

Start Hunting!

Translated by