title: Get values of elements at specific indices in a matlab matrix
body: <p>I was wondering if there is a quick way in matlab (pretty sure there is and I just don't know it!) to get all the values of an array at specific indices. Example: If I have an array:</p>
  
  <pre><code>a = [1,3,5,7,9]
  </code></pre>
  
  <p>and I have my list of indices <code>[2,3]</code>, I am looking for a function that will give me back <code>[3,5]</code>
  which are the values at indices 2,3 in the array 'a'. The straightforward solution is to loop through and index one at a time but I would like to know of a faster more efficient built-in function if one exists.</p>
  
  <p>And as far as I have read, find function only returns the index where a particular value is present. I am looking for the opposite scenario wherein I pass in the indices as a array and all the values present in 'a' at those indices are returned. Any help would be much appreciated!</p>
  
  <p>Thanks in advance.</p>