title: How to generate a matrix through a loop?
body: <p>I´m wondering how to get these in Matlab:</p>
  
  <pre><code>a = 
  1 3
  2 4
  3 5
  4 6
  5 7
  6 8
  7 9
  8 10
  9 11
  10 12
  </code></pre>
  
  <p>Really the structure I want to do has 2 thousand files. but I will start with something easier.
  So I was thinking about to do it throught a loop:</p>
  
  <pre><code>for i=1:1:10
  a(i) = [i i+2]
  end
  </code></pre>
  
  <p>but this give an error:</p>
  
  <pre><code>???  In an assignment  A(I) = B, the number of elements in B and
  I must be the same.
  </code></pre>
  
  <p>The idea is to generate a entire matrix (or structure, I suppose both are the same...) using a for loop (or may be there is a way to do it without any case of loop...).
  Does anyone could tell me how to do it?
  Thank you so much!</p>