Is it possible to create multiple functions and calling them in one .m file?
Afficher commentaires plus anciens
I have a question about calling a function in Gui. Here is an example of my code:
function pushbutton1_Callback(hObject, eventdata, handles)
ABC = handles.Murthy(result); %%????? This line
%button implementation
function maxmax = Murthy (result)
%Murthy implementation
The function Murthy also contains "axes(handles.axes1);" etc. How to call function Murthy without deleting gui control codes (like "axes(handles.axes1)" etc) from it? Thanks in advance!
4 commentaires
Jan
le 27 Août 2013
The question is not clear. Why should you delete "axes(handles.axes1)" from where? What is the contents of "handles.Murthy"? Is it a function handle? Perhaps you want this:
ABC = Murthy(result); % Without "handles."?!
Ekin
le 27 Août 2013
Walter Roberson
le 27 Août 2013
Modifié(e) : Walter Roberson
le 27 Août 2013
ABC = handles.Murthy(result);
is not going to work because you do not have "result" defined.
Is Murthy going to return the name of an axis ? Is it going to return an axes object that you then want placed under a figure determined by pushbutton1_Callback ??
Ekin
le 28 Août 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!