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 で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!