Help with user input differentiation
2 views (last 30 days)
Show older comments
I setup a GUI with an edit text box, static text box, and a push button. I want the user to be able to insert their function into the edit text box, click the push button, and the derivative of the function appears in the static text box. I would like some help on how to do this, thank you.
I have this in my push button callback:
% Define x as a symbol
syms x
% Get edit text
edit1String = get(handles.edit1, 'string');
% Defining the function to be differentiated
dydx = diff(edit1string);
% Display it on a static text label
set(handles.text1, 'String', dydx);
0 Comments
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!