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 17:02:01 +0000 (UTC)
Organization: Xoran Technologies
Lines: 19
Message-ID: <h5mve9$o6b$1@fred.mathworks.com>
References: <a2f1b899-3886-492b-adb0-9530210f6315@g19g2000vbi.googlegroups.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 1249837321 24779 172.30.248.35 (9 Aug 2009 17:02:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 9 Aug 2009 17:02:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:561948


David <david.b.a.epstein@googlemail.com> wrote in message <a2f1b899-3886-492b-adb0-9530210f6315@g19g2000vbi.googlegroups.com>...

> 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'

This seems like a bad way to store data. Why not use a struct array 

sta=[ta{:}];

instead of burying each struct inside a cell where it is harder to get at?