In GUIDE, How can I perform differentiation of a function input by the user?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!