Path: news.mathworks.com!not-for-mail
From: Loren Shure <loren@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Function questions
Date: Mon, 11 May 2009 07:55:35 -0400
Organization: The MathWorks
Lines: 24
Message-ID: <MPG.2471dc3ebd35e04898999e@news.mathworks.com>
References: <gu3a8b$pet$1@fred.mathworks.com> <gu3c4a$ob1$1@fred.mathworks.com>
NNTP-Posting-Host: shurel.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1242042935 20168 172.31.57.206 (11 May 2009 11:55:35 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 11 May 2009 11:55:35 +0000 (UTC)
User-Agent: MicroPlanet-Gravity/2.70.2067
Xref: news.mathworks.com comp.soft-sys.matlab:538965


In article <gu3c4a$ob1$1@fred.mathworks.com>, 
b.luong@fogale.findmycountry says...
> I keep this message for copy and past now and then:
> 
> Functions in GUI, like any other functions, have their own private workspace. They are not shared, and they are clear when the (nested) function ends.
> 
> To pass data among functions in Gui (it can be many guis), we have to use one of these options:
> 
> - GUIDATA
> - SET/GETAPPDATA
> - SET/GET on the field USERDATA of graphic handles of your GUI
> - GLOBAL variables
> - ASSIGNIN/EVALIN
> 
> The first ones are preferred methods. The two last are to be avoided.
> 
> Bruno 
> 

Another option: use nested functions.

-- 
Loren
http://blogs.mathworks.com/loren