|
"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
|