Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: reshape/squeeze for structs?
Date: Sun, 30 Sep 2007 17:15:26 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <fdolje$oiq$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1191172526 25178 172.30.248.36 (30 Sep 2007 17:15:26 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 30 Sep 2007 17:15:26 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:430742



I simply want to count the number of 1's in a specific field
of a struct, like this

a(1).yesno=1;
a(2).yesno=1;
a(3).yesno=0;

if i lookat

a.yesno

i see there are two 1's and one 0.

how can i put these into a vector so i dont have to count in
a loop?  Reshape and Squeeze are giving me grief because
this is a struct.

Thanks,

David