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

1 回表示 (過去 30 日間)
Lim
Lim 2015 年 1 月 6 日
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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by