title: Inserting zeros into an array and looping using a for loop
body: <p>I have <strong>several arrays</strong> that are calculated example <code>a,b and c</code> <strong>(there are more than three)</strong> are calculated:  <strong>Please note this is just an example the numbers are much larger and are not so basic</strong>
   <code>a=[1,2,3,4,5]</code> <code>b=[10,20,30,40,50]</code> <code>c=[100,200,300,400,500]</code> and I want a <code>for loop</code> that inserts zeros into it so I can have the <code>new_abc</code> array steps look like.</p>
  
  <pre><code>    1st for loop step new_abc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
      2nd for loop step new_abc=[1,0,0,2,0,0,3,0,0,4,0,0,5,0,0] 
      3rd for loop step new_abc=[1,10,0,2,20,0,3,30,0,4,40,0,5,50,0] 
      4th for loop step new_abc=[1,10,100,2,20,200,3,30,300,4,40,400,5,50,500] 
  </code></pre>
  
  <p>how can I do this with a <code>for</code> loop?</p>
  
  <p>I started with the code below which gives me the zeros</p>
  
  <pre><code>a=[1,2,3,4,5]
  new_abc=zeros(1,length(a)*(3));
  </code></pre>
  
  <p>But I'm not sure how to place the values of the array <code>a</code> <code>b</code> and <code>c</code> using a <code>for loop</code>into the correct locations of<code>new_abc</code></p>
  
  <p>I know I could place all the arrays into one large array and do a reshape but the calculated arrays I use become to large and I run out of ram, so reading / calculating each array and inserting them into one common array <code>new_abc</code>using a <code>for loop</code> works best. </p>
  
  <p>I'm running octave 3.8.1 which is like matlab.</p>