Is it possible to create multiple functions and calling them in one .m file?
Show older comments
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 Comments
Jan
on 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
on 27 Aug 2013
Walter Roberson
on 27 Aug 2013
Edited: Walter Roberson
on 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
on 28 Aug 2013
Accepted Answer
More Answers (0)
Categories
Find more on Dynamic System Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!