Filter löschen
Filter löschen

In GUIDE, How can I perform differentiation of a function input by the user?

1 Ansicht (letzte 30 Tage)
The following is how I get the function input by the user. I would like to add a push button on the GUIDE that can differentiate this function, and another push button to plot the differentiated function.
Thank you!
function y1_Callback(hObject, eventdata, handles) % hObject handle to y1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of y1 as text % str2double(get(hObject,'String')) returns contents of y1 as a double stringf=get(hObject,'String'); handles.stringf=stringf; guidata(hObject,handles); y1=@(x) eval(get(hObject,'String')); handles.y1=y1; guidata(hObject,handles);

Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by