title: matlab: expand vector using colon notation
body: <p>I would like to expand an existing vector into a matrix using colon notation, or some other efficient way.</p>
  
  <p>For example, using colon notation to create a matrix, I can do </p>
  
  <pre><code>&lt; [0:4;5:9]
  </code></pre>
  
  <p>which will give me</p>
  
  <pre><code>&lt; [
  0 1 2 3 4
  5 6 7 8 9]
  </code></pre>
  
  <p>I want to be able to do the same thing but with a provided original vector and range. For example, if my original vector is [1;3] and my range is 1 around the existing values, I wish to obtain the following output:</p>
  
  <pre><code>&lt; [
  0 1 2
  2 3 4]
  </code></pre>
  
  <p>I know I can do this using a loop but I was wondering if there's a way I can do without the loop.</p>
  
  <p>Thanks.</p>