Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: avoiding loop for defining all elements of a structure ??
Date: Sun, 26 Jul 2009 22:04:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <h4ijsj$pq2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248645843 26434 172.30.248.38 (26 Jul 2009 22:04:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 26 Jul 2009 22:04:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1646679
Xref: news.mathworks.com comp.soft-sys.matlab:558461


I have a structure with 25 entries:

a(1).start
a(2).start 
...
a(25).start

I want to define all of these to be zeros(1,5)

But a(:).start=zeros(1,5) doesn't work

Is there a way to do this WITHOUT loops or converting to cells or matrices ??