title: How can I concatenate ranges of numbers into an array in MATLAB?
body: <p>For example, I want to combine two ranges of numbers like this:</p>
  
  <pre><code>1 2 3 4 5 11 12 13 14 15 16 17 18 19 20
  </code></pre>
  
  <p>So, I tried:</p>
  
  <pre><code>a = 1:5,11:20
  </code></pre>
  
  <p>but that didn't work.</p>
  
  <p>I also want to do this in a non-hardcoded way so that the missing 5 elements can start at any index.</p>