<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/249364</link>
    <title>MATLAB Central Newsreader - How to change value of field in a array of structures</title>
    <description>Feed for thread: How to change value of field in a array of structures</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 18 Apr 2009 19:18:21 -0400</pubDate>
      <title>How to change value of field in a array of structures</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/249364#643694</link>
      <author>Henry</author>
      <description>Is there a quicker way to do this?&lt;br&gt;
&lt;br&gt;
for iStruct = 1:length(myStruct)&lt;br&gt;
&amp;nbsp;&amp;nbsp;myStruct(iStruct).field = 'New Value';&lt;br&gt;
end</description>
    </item>
    <item>
      <pubDate>Sat, 18 Apr 2009 19:33:01 -0400</pubDate>
      <title>Re: How to change value of field in a array of structures</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/249364#643696</link>
      <author>Bruno Luong</author>
      <description>Henry &amp;lt;zemp@itp.unibe.ch&amp;gt; wrote in message &amp;lt;d561906c-62a3-4884-93c8-07721039c078@k8g2000yqn.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Is there a quicker way to do this?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for iStruct = 1:length(myStruct)&lt;br&gt;
&amp;gt;   myStruct(iStruct).field = 'New Value';&lt;br&gt;
&amp;gt; end&lt;br&gt;
&lt;br&gt;
[myStruct(iStruct).field] = deal('New  Value')&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Sat, 18 Apr 2009 19:59:02 -0400</pubDate>
      <title>Re: How to change value of field in a array of structures</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/249364#643701</link>
      <author>Jiro Doke</author>
      <description>&quot;Bruno Luong&quot; &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;gsd9td$g4b$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Henry &amp;lt;zemp@itp.unibe.ch&amp;gt; wrote in message &amp;lt;d561906c-62a3-4884-93c8-07721039c078@k8g2000yqn.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Is there a quicker way to do this?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; for iStruct = 1:length(myStruct)&lt;br&gt;
&amp;gt; &amp;gt;   myStruct(iStruct).field = 'New Value';&lt;br&gt;
&amp;gt; &amp;gt; end&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; [myStruct(iStruct).field] = deal('New  Value')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
&lt;br&gt;
I think you meant&lt;br&gt;
&lt;br&gt;
[myStruct.field] = deal('New Value')&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
jiro</description>
    </item>
    <item>
      <pubDate>Sat, 18 Apr 2009 20:03:01 -0400</pubDate>
      <title>Re: How to change value of field in a array of structures</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/249364#643703</link>
      <author>Bruno Luong</author>
      <description>&quot;Jiro Doke&quot; &amp;lt;jiro.doke@mathworks.com&amp;gt; wrote in message &amp;lt;gsdbe6$o0n$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I think you meant&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; [myStruct.field] = deal('New Value')&lt;br&gt;
&lt;br&gt;
Yes. Thanks for the correction! ;-)&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Sat, 18 Apr 2009 20:54:59 -0400</pubDate>
      <title>Re: How to change value of field in a array of structures</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/249364#643709</link>
      <author>Henry</author>
      <description>Hi Bruno, Hi Jiro&lt;br&gt;
&lt;br&gt;
Thank you very much. I thought there must be some easy way to do this.&lt;br&gt;
&lt;br&gt;
With best regards&lt;br&gt;
&lt;br&gt;
Henry</description>
    </item>
  </channel>
</rss>

