Is it possible to create multiple functions and calling them in one .m file?
Ältere Kommentare anzeigen
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 Kommentare
Jan
am 27 Aug. 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
am 27 Aug. 2013
Walter Roberson
am 27 Aug. 2013
Bearbeitet: Walter Roberson
am 27 Aug. 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
am 28 Aug. 2013
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!