Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g19g2000vbi.googlegroups.com!not-for-mail
From: David <david.b.a.epstein@googlemail.com>
Newsgroups: comp.soft-sys.matlab
Subject: cell arrays and structs
Date: Sun, 9 Aug 2009 03:38:58 -0700 (PDT)
Organization: http://groups.google.com
Lines: 20
Message-ID: <a2f1b899-3886-492b-adb0-9530210f6315@g19g2000vbi.googlegroups.com>
NNTP-Posting-Host: 79.66.214.135
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1249814339 9628 127.0.0.1 (9 Aug 2009 10:38:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 9 Aug 2009 10:38:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g19g2000vbi.googlegroups.com; posting-host=79.66.214.135; 
	posting-account=5tQcbAkAAACBTNiB5qbLUOHVUCr3iZqF
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; 
	rv:1.9.0.13; Google-TR-3) Gecko/2009073021 Firefox/3.0.13,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:561920


I have a 380x1 cell array fPN. Each cell has class 'char' and contains
a string.
I also have a 380x1 cell array ta. Each cell has class 'struct'. For
example I get

>> ta{5}

ans =

        num: '1'
       cond: 'CANCER'
         vf: '1'
    protein: 'CEA_01'

My question is: Is there an array method to add to each ta{i} a new
field whose value will be the string in fPN{i}, or should I just give
up and loop through the cells, adding the new field one by one?

Thanks
David