Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: GA outputs
Date: Thu, 21 Aug 2008 20:43:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <g8kk0m$fa6$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1219351382 15686 172.30.248.35 (21 Aug 2008 20:43:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 21 Aug 2008 20:43:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:486721



Does anyone know how I can pass variables back from a 
genetic algorithm (GA) optimisation function to the m file 
that initiated the GA?

I am using anonymous functions to pass variables to the GA, 
but cannot work out how to get variables back from the GA. 
It appears that the only allowable outputs are 
[x,fval,exitflag,output,population,scores].

One way could be to write each variable to file and then 
read them back from that file, but that is very 
inefficient. I am trying to avoid using global variables as 
I run into problems with these when running the GA in 
parallel using the parallel computing toolbox. 

Hopefully someone can point me in the right direction. 
Thanks!