title: Merge two arrays Matlab
body: <p>I want to know the shortest route to do this, thus asking the question, though it can be done in many ways.</p>
  
  <p>Suppose there are two arrays </p>
  
  <pre><code>    A1 = [x1 y1
            x2 y2
            x3 y3
            0  0
            0  0
            0  0
            0  0
                ]
  </code></pre>
  
  <p>and    </p>
  
  <pre><code>   A2 = [a1 b1
            a2 b2
            a3 b3
            a4 b4
            0  0
            0  0
            0  0
                ]
  </code></pre>
  
  <p>Now, how to merge A1 and A2 in the shortest way, such that</p>
  
  <pre><code>   A = [x1 y1
          x2 y2
          x3 y3
          a1 b1
          a2 b2
          a3 b3
          a4 b4]
  </code></pre>
  
  <p>Am weak when it comes to array indexing. I have implemented two for loops and some if statements to do this, but I feel there is a shortest way. Can you please help?  </p>