Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to change value of field in a array of structures
Date: Sat, 18 Apr 2009 19:33:01 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 10
Message-ID: <gsd9td$g4b$1@fred.mathworks.com>
References: <d561906c-62a3-4884-93c8-07721039c078@k8g2000yqn.googlegroups.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1240083181 16523 172.30.248.37 (18 Apr 2009 19:33:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 18 Apr 2009 19:33:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:533737


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