How to take output from another m file in gui?

hi, I am rohan, I have new to gui , i want to make gui in which when I chick to push button one program should run (which is having plot of sine wave) but that output can show in gui axes again can anyone help me out please?

1 件のコメント

Rohan Ghare
Rohan Ghare 2013 年 6 月 13 日
the out put of m file is plot which is in another figure window then how can it display in that gui

サインインしてコメントする。

 採用された回答

David Sanchez
David Sanchez 2013 年 6 月 13 日

0 投票

to run any other m-file from the GUI, just make a call to the desired m-file on the pushbutton callback function.
function my_push_callback(...)
my_m_file.m;
To plot to axes within the GUI, take note of the tag assigned to the axes in property manager:
plot(x,y,'Parent',handles.axes_tag)

3 件のコメント

Rohan Ghare
Rohan Ghare 2013 年 6 月 13 日
can u please explain with example?
Walter Roberson
Walter Roberson 2013 年 6 月 14 日
Do not include the ".m" extension.
function my_push_callback(src, event)
my_m_file();
end
rohit
rohit 2020 年 9 月 2 日
If you are using App designer:
plot(app.UIAxes,x,y);

サインインしてコメントする。

その他の回答 (1 件)

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

質問済み:

2013 年 6 月 13 日

コメント済み:

2020 年 9 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by