Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: cell arrays and structs
Date: Sun, 9 Aug 2009 15:20:02 +0000 (UTC)
Organization: Xoran Technologies
Lines: 12
Message-ID: <h5mpf2$lfu$1@fred.mathworks.com>
References: <a2f1b899-3886-492b-adb0-9530210f6315@g19g2000vbi.googlegroups.com> <see-82000A.08402409082009@news.frontiernet.net>
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 1249831202 22014 172.30.248.37 (9 Aug 2009 15:20:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 9 Aug 2009 15:20:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:561941


Doug Schwarz <see@sig.for.address.edu> wrote in message <see-82000A.08402409082009@news.frontiernet.net>...

> Yes, suppose you want to use the field name 'string', then
> 
>   [ta.string] = fPN{:};
> 
> will do it if your version of MATLAB is new enough.
> 

Of if not, then the following should work for older versions

[ta(1:length(fpN)).string] = deal(fPN{:});