Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news.aset.psu.edu!support1.mathforum.org!not-for-mail
From: bogfrog <jmcgraw@rcn.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: passing images between two GUI
Date: Fri, 08 Aug 2008 20:27:56 EDT
Organization: The Math Forum
Lines: 20
Message-ID: <21579291.1218241707359.JavaMail.jakarta@nitrogen.mathforum.org>
References: <g7immk$igr$1@fred.mathworks.com>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1218241707 13315 144.118.30.135 (9 Aug 2008 00:28:27 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Sat, 9 Aug 2008 00:28:27 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:484612



> i watched this video .. i just dunno how to apply
> that on
> axes .. i'm a matlab newbie
> 
> but thanx anyway

Well what you should take away, is that you can store your data using setappata() and then get it anywhere else using the handle to where it is stored.  So, you might have this in the _opening function_ of your main gui:

setappdata(0,'hMainGui',gcf); %note: gcf gets the handle

then, once you load up your image elsewhere in your code, you can do this:

setappdata(hMainGui,'myImage',imageMatrix);

then inside the functions for your _other_ gui, you do this:

hMainGui = getappdata(0,'hMainGui');
imageMatrix = getappdata(hMainGui,'myImage');

and you will have access to the image in your new gui.