Path: news.mathworks.com!not-for-mail
From: "Phil Goddard" <philNOSPAM@goddardconsulting.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: big bug with GUIDE
Date: Wed, 12 Aug 2009 22:21:03 +0000 (UTC)
Organization: Goddard Consulting
Lines: 10
Message-ID: <h5vf8f$g4p$1@fred.mathworks.com>
References: <gl36da$6ih$1@fred.mathworks.com> <glmsmo$mb7$1@fred.mathworks.com> <e538a250-1a99-4731-b6b1-2336da4ec876@r10g2000prf.googlegroups.com> <glskpu$htc$1@fred.mathworks.com> <h5t2lq$5mr$1@fred.mathworks.com> <h5vcak$4hv$1@fred.mathworks.com>
Reply-To: "Phil Goddard" <philNOSPAM@goddardconsulting.ca>
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 1250115663 16537 172.30.248.38 (12 Aug 2009 22:21:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 12 Aug 2009 22:21:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: news.mathworks.com comp.soft-sys.matlab:562840



> If you "load" the file, the contents is imported as variables in the work spaces. So "whos" should show you the imported data.
> It is less confusing to import the data to a variable:
>   FigData = load('myFigFile.fig', '-mat')

A .fig file contains only one variable and it is already a structure, plus the name of the variable is the same as the one that needs to be used when saving the altered structure back into a .fig file, so I don't believe using the functional form of load gains anything.

On the saving end you do need to be careful in that the command I give will save all variables when in fact you only want to save the (altered) one that came from the .fig file.

Phil.