title: Extracting values along a row, column or diagonal of a 2D matrix
body: <p>I have a 2 dimensional matrix and I want to get the data along a particular line. Similar to what 'Slice' does to a 3D matrix. Is there a a way to do a similar thing on a 2D matrix.</p>
  
  <p>Thanks in advance.</p>