Path: news.mathworks.com!not-for-mail
From: "Ashwini Deshpande" <vd.ashwini@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Talking to multiple GUI
Date: Mon, 14 Apr 2008 07:05:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 32
Message-ID: <ftuvn0$5a2$1@fred.mathworks.com>
References: <foglbe$o9o$1@fred.mathworks.com> <MPG.221a7f246133aa92989803@news.mathworks.com> <ftt4mp$3p$1@fred.mathworks.com>
Reply-To: "Ashwini Deshpande" <vd.ashwini@mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208156704 5442 172.30.248.38 (14 Apr 2008 07:05:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 14 Apr 2008 07:05:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1101624
Xref: news.mathworks.com comp.soft-sys.matlab:462779


"Amol " <amol.borkar@gmail.com> wrote in message
<ftt4mp$3p$1@fred.mathworks.com>...
> I got most of the multiple gui control working using the
> global variables approach. Now I am trying to build a VCR
> type application where I have the plot in one figure and the
> VCR controls in the other figure. I am able to control
> everything except display things on the plot since there
> doesnt seem to be a call back where I can set a global
> variable. Any suggestions?

Hai,

To define axes handles as global variable u need not have
callback function for it. Try out the following:
define the Tag of axes object as 'plot', and make its handle
as global parameter in opening function of the GUI

m_file 1:
function GUI_openingFcn(hObject, eventdata, handles)
global h_plot
h_plot = handles.plot;

m_file 2:
function myfile
global h_plot
axes(h_plot);
t = 0:0.01:1;
x = sin(2*pi*3*t);
plot(t,x) %%% now this signal will be plotted in the axes of
1st GUI.