title: for loop in matlab storing values (scalar times vector array)
body: <p>I would like to know in matlab how to accomplish the following task:</p>
  
  <p>If i have a for loop like in the following lines:</p>
  
  <pre><code>b=[1 2 3 4];
  for i=1:1:10
  x=i.*b
  end
  </code></pre>
  
  <p>the code iterates i-times multiplying a scalar times the vector b; but if i put in the for loop x(i) in order to store the resulting vector of every iteration, i wouldn't get what i'm looking for. What i'm lookig for is to get:</p>
  
  <pre><code>x(1)=[1 2 3 4]
  x(2)=[2 4 6 8]
  ... and so on
  </code></pre>