필터 지우기
필터 지우기

Help with multi-window GUI

조회 수: 2 (최근 30일)
Future Science
Future Science 2011년 8월 10일
댓글: Omer Yuval 2020년 10월 18일
My GUI tool is thus organized:
1) input_screen.m, where the user can only enter numeric values;
2) callbacks of various scripts and functions;
3) Plots and numeric results.
Instead of visualizing plots and numeric results within Matlab's main window, I want to show them in a results_screen.m kind of window.
I've been reading various help files, such as "Making multitple GUIs work together" and "Sharing Data Among a GUI's Callbacks" and I've asked previously here, but I can't find a proper workaround for my GUI.
For example, I've created axes within the results_screen.m
Now how can I use them to show my plots?
I can't figure it out how to put these commands: fig = figure(); ax = axes('Parent',fig); plot(ax,X,Y);
Same for uitable('Style' 'text') where I want to show my numeric results.
  댓글 수: 1
Omer Yuval
Omer Yuval 2020년 10월 18일
https://uk.mathworks.com/matlabcentral/fileexchange/81348-gui_template

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

채택된 답변

Amir Hamzah UTeM
Amir Hamzah UTeM 2011년 8월 10일
im also beginner with matlab. However my way to show a data in other window GUI is like this.
1. i save all the value that input from input_screen.m in MAT files
save VALUE a b c
2. i create new button to open the new window for results_screen GUI
result_screen()
3. i load from previous saved MAT files in results_screen then i can use that value to plot at axes in results_screen window.
load VALUE
That my way,hope it will help you.
  댓글 수: 1
Future Science
Future Science 2011년 8월 12일
Very easy and useful tip! Thx a lot!

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

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 10일
편집: John Kelly 2015년 2월 27일
Go to this page and click Axes, you will find a good example. By the way, the same info is in the MATLAB document. Type doc and on the left column, click MATLAB->Creating Graphical User Interfaces ... and so on.
And a quick example:
fig=figure;
h_table=uicontrol('style','text','parent',fig);
set(h_table,'string',num2str(1:3));
h_axes=axes('parent',fig,'position',[.2 .2 .7 .7]);
plot(h_axes,1:10);

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by