Help with multi-window GUI

1 view (last 30 days)
Future Science
Future Science on 10 Aug 2011
Commented: Omer Yuval on 18 Oct 2020
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 Comment
Omer Yuval
Omer Yuval on 18 Oct 2020

Sign in to comment.

Accepted Answer

Amir Hamzah UTeM
Amir Hamzah UTeM on 10 Aug 2011
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
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 Comment
Future Science
Future Science on 12 Aug 2011
Very easy and useful tip! Thx a lot!

Sign in to comment.

More Answers (1)

Fangjun Jiang
Fangjun Jiang on 10 Aug 2011
Edited: John Kelly on 27 Feb 2015
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:
h_axes=axes('parent',fig,'position',[.2 .2 .7 .7]);


Find more on Migrate GUIDE Apps in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!