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

1 次查看(过去 30 天)
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);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by