Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Save with -struct option
Date: Wed, 12 Mar 2008 18:55:03 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 19
Message-ID: <fr98u7$e7h$1@fred.mathworks.com>
References: <fr8hi2$b2m$1@fred.mathworks.com> <fr8iae$ksm$1@fred.mathworks.com> <fr8jt2$e3r$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1205348103 14577 172.30.248.37 (12 Mar 2008 18:55:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 12 Mar 2008 18:55:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:456879



"Ben ":
<SNIP <us> was wrong

> Thanks, but not exactly what I was asking...

well, you may want to look at this solutions

     s.a='a';
     s.b=pi;
     s.c=magic(3);
     fnam='foo.mat'; % <- use your file name!
     save(fnam,'-struct','s');
     clear s;
     whos('-file',fnam)
     s=load(fnam);
     disp(s)

us