Thread Subject: GUI and workspace

Subject: GUI and workspace

From: Hong

Date: 28 Mar, 2008 13:50:03

Message: 1 of 2

Hi, I create a GUI to run my simulink model. However, there
is a problem when I tried to plot the figure at the end of
simulation.

The call back function of GUI can't access the workspace
data generated by the simulation.

Therefore, my question is: how can I access the workspace
data in the GUI push button callback function.

Thanks in advance.

Subject: GUI and workspace

From: sfreeman

Date: 28 Mar, 2008 14:20:05

Message: 2 of 2

"Hong " <honghaot@gmail.com> wrote in message
<fsit2b$8hv$1@fred.mathworks.com>...
> Hi, I create a GUI to run my simulink model. However,
there
> is a problem when I tried to plot the figure at the end
of
> simulation.
>
> The call back function of GUI can't access the workspace
> data generated by the simulation.
>
> Therefore, my question is: how can I access the workspace
> data in the GUI push button callback function.
>
> Thanks in advance.


you may try to store the data - preferable per 'guidata' &
a structure. You can find your GUI from a final Simulink
function via a 'Tag' on the GUI main figure.

Then you should be able to access it in the uicontrol
callback function via

data = guidata(gcbf)


alternative is to use appdata(0,...) instead of your GUI
figure and guidata

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simulink gui Hong 28 Mar, 2008 09:55:04
rssFeed for this Thread

Contact us at files@mathworks.com