Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Function questions
Date: Sat, 9 May 2009 09:46:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 17
Message-ID: <gu3jcp$vb$1@fred.mathworks.com>
References: <gu3a8b$pet$1@fred.mathworks.com> <gu3c4a$ob1$1@fred.mathworks.com> <gu3g7h$gpr$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1241862361 1003 172.30.248.37 (9 May 2009 09:46:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 9 May 2009 09:46:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:538642



> 
> 
> Is it possible to create this type of structure which is accessible to multiple functions without using guihandles, as in from the struct data type? This only works when associated with a figure. If not, would it be advisable to use non-visible figures to pass data between functions in a non-GUI related program?

Why such a need? Non GUI program are usually in the same thread, no callback or timer involved, linearly performed. So just create your structures and pass them among functions as input arguments. Function parameter is designed for that, abuse it.

> 
> Also, what exactly is this doing? Is it saving your information to the temporary figure file and then reading it when you use guidata? 

There is no file involved.

> Would it be a bad idea to use an external .txt or other file to pass information from program to program or function to function, or is there another way to do it? Is this common practice?

Yes it's a bad idea using file. Just use function parameters as commonly practiced. What is the fear of it??? Such strange question.

Bruno