title: Got confused with a vector indexed by a matrix, in Matlab
body: <p>The following codes runs in Matlab:</p>
  
  <pre><code>a = [1 2 3 4]
  b = [ 1 2 3; 1 2 3; 1 2 3]
  a(b)
  </code></pre>
  
  <p>The result of a(b) is a matrix: </p>
  
  <pre><code>[ 1 2 3; 1 2 3; 1 2 3]
  </code></pre>
  
  <p>Can anyone explain what happened here? Why a vector can be indexed by a matrix, how to interpret the result?</p>