Control GUI with a script

조회 수: 3 (최근 30일)
Gabriel Bischof
Gabriel Bischof 2019년 7월 30일
답변: Kanishk 2024년 12월 26일
I have a GUI wich shows a plot and Buttons wich should set some Datas.
Is it possible to plot in this GUI with an script?
For example:
H=GUIcontrol
Function setPlot(x,y)
H.plot(x,y)
End
  댓글 수: 3
Gabriel Bischof
Gabriel Bischof 2019년 7월 30일
편집: Gabriel Bischof 2019년 7월 30일
I have used GUIDE GUI. So you would recommend to create the GUI without GUIDE GUI?
I will try this. Thanks a lot
Adam
Adam 2019년 7월 30일
If you want to control it externally I would, yes.

댓글을 달려면 로그인하십시오.

답변 (1개)

Kanishk
Kanishk 2024년 12월 26일
To plot data inside the axes of an App, you can design a simple app in MATLAB App Designer with axes. In MATLAB, create an object of the app and plot the data using the plot function. Here is an example code with MATLAB App named "appWithAxes".
app = appWithAxes;
x = linspace(0,10);
y = sin(x);
plot(app.UIAxes, x, y);
This plots the data in the MATLAB App.
You can also create public functions and execute them from external MATLAB script.
To learn more about plot function you can execute the following command in MATLAB command window.
web(fullfile(docroot, 'matlab/ref/plot.html'))

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by