Is it possible to create multiple functions and calling them in one .m file?
이전 댓글 표시
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
Jan
2013년 8월 27일
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
2013년 8월 27일
Walter Roberson
2013년 8월 27일
편집: Walter Roberson
2013년 8월 27일
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
2013년 8월 28일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Develop Apps Programmatically에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!