<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241176</link>
    <title>MATLAB Central Newsreader - Problem with a loop!!!</title>
    <description>Feed for thread: Problem with a loop!!!</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>Wed, 17 Dec 2008 09:56:03 -0500</pubDate>
      <title>Problem with a loop!!!</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241176#617522</link>
      <author>george </author>
      <description>Hello,&lt;br&gt;
..So,i have a loop,&lt;br&gt;
and i want to make an array with the same columns,but i want to increased the rows  in every loop.&lt;br&gt;
for example i have this:&lt;br&gt;
&lt;br&gt;
for k=1:15&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;qw[k][7]=[r_Ti(1,2),r_Te(1,2),r_F(1,2),r_Vt(1,2),r_Vi(1,2),r_Vei(1,2),r_Vee(1,2)];&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
is this correct?&lt;br&gt;
&lt;br&gt;
And i want in the end of this loop one array with 15 rows and 7 colums..How can i get this?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
ps&quot;the values of r_Ti(1,2) etc. in every loop are different&quot; &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks for your attention!!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I hope that you understand .because i don't now good english...</description>
    </item>
    <item>
      <pubDate>Wed, 17 Dec 2008 10:31:03 -0500</pubDate>
      <title>Re: Problem with a loop!!!</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241176#617534</link>
      <author>Sebastiaan </author>
      <description>Well, there are basically 2 options: make a normal matrix with 0's or NaN's, or use the cell functions:&lt;br&gt;
&lt;br&gt;
B = zeors(15, 7);&lt;br&gt;
B(:) = NaN;&lt;br&gt;
B(1,1) = [1];&lt;br&gt;
B(1,1:2) = [1 2];&lt;br&gt;
B(1,1:3) = [1 2 3];&lt;br&gt;
&lt;br&gt;
-or-&lt;br&gt;
&lt;br&gt;
A = cell(15, 1);&lt;br&gt;
A{1} = [1];&lt;br&gt;
A{2} = [1 2];&lt;br&gt;
A{3} = [1 2 3];&lt;br&gt;
&lt;br&gt;
Greetz,&lt;br&gt;
&lt;br&gt;
&quot;george &quot; &amp;lt;qwerty6542@yahoo.gr&amp;gt; wrote in message &amp;lt;giaibj$6q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; ..So,i have a loop,&lt;br&gt;
&amp;gt; and i want to make an array with the same columns,but i want to increased the rows  in every loop.&lt;br&gt;
&amp;gt; for example i have this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for k=1:15&lt;br&gt;
&amp;gt;     qw[k][7]=[r_Ti(1,2),r_Te(1,2),r_F(1,2),r_Vt(1,2),r_Vi(1,2),r_Vei(1,2),r_Vee(1,2)];&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; is this correct?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; And i want in the end of this loop one array with 15 rows and 7 colums..How can i get this?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ps&quot;the values of r_Ti(1,2) etc. in every loop are different&quot; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for your attention!!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I hope that you understand .because i don't now good english...</description>
    </item>
  </channel>
</rss>

