title: how do I save the result of loop for in a matrix?
body: <p>I need to save  results of a for loop in a matrix where its size is 4*1?</p>
  
  <p>My function: </p>
  
  <pre><code>function test()
  for j=2:2:8
      h= 3*j
  end
  end
  </code></pre>
  
  <p>results:</p>
  
  <pre><code>h=6
  h=12
  h=18
  h=24
  </code></pre>
  
  <p>Thank you in advance.</p>