Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to change value of field in a array of structures
Date: Sat, 18 Apr 2009 19:59:02 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 19
Message-ID: <gsdbe6$o0n$1@fred.mathworks.com>
References: <d561906c-62a3-4884-93c8-07721039c078@k8g2000yqn.googlegroups.com> <gsd9td$g4b$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 1240084742 24599 172.30.248.38 (18 Apr 2009 19:59:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 18 Apr 2009 19:59:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869871
Xref: news.mathworks.com comp.soft-sys.matlab:533742


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gsd9td$g4b$1@fred.mathworks.com>...
> Henry <zemp@itp.unibe.ch> wrote in message <d561906c-62a3-4884-93c8-07721039c078@k8g2000yqn.googlegroups.com>...
> > Is there a quicker way to do this?
> > 
> > for iStruct = 1:length(myStruct)
> >   myStruct(iStruct).field = 'New Value';
> > end
> 
> [myStruct(iStruct).field] = deal('New  Value')
> 
> Bruno

I think you meant

[myStruct.field] = deal('New Value')



jiro