<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/256988</link>
    <title>MATLAB Central Newsreader - avoiding loop for defining all elements of a structure ??</title>
    <description>Feed for thread: avoiding loop for defining all elements of a structure ??</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>Sun, 26 Jul 2009 22:04:03 -0400</pubDate>
      <title>avoiding loop for defining all elements of a structure ??</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/256988#668276</link>
      <author>Juliette Salexa</author>
      <description>I have a structure with 25 entries:&lt;br&gt;
&lt;br&gt;
a(1).start&lt;br&gt;
a(2).start &lt;br&gt;
...&lt;br&gt;
a(25).start&lt;br&gt;
&lt;br&gt;
I want to define all of these to be zeros(1,5)&lt;br&gt;
&lt;br&gt;
But a(:).start=zeros(1,5) doesn't work&lt;br&gt;
&lt;br&gt;
Is there a way to do this WITHOUT loops or converting to cells or matrices ??</description>
    </item>
    <item>
      <pubDate>Sun, 26 Jul 2009 22:42:02 -0400</pubDate>
      <title>Re: avoiding loop for defining all elements of a structure ??</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/256988#668278</link>
      <author>us</author>
      <description>&quot;Juliette Salexa&quot; &amp;lt;juliette.physicist@gmail.com&amp;gt; wrote in message &amp;lt;h4ijsj$pq2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have a structure with 25 entries:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; a(1).start&lt;br&gt;
&amp;gt; a(2).start &lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; a(25).start&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I want to define all of these to be zeros(1,5)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; But a(:).start=zeros(1,5) doesn't work&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there a way to do this WITHOUT loops or converting to cells or matrices ??&lt;br&gt;
&lt;br&gt;
a hint:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;help deal;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;help struct;     % &amp;lt;- look at the CELL mode&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
  </channel>
</rss>

