title: How to select a part of vector in boost c++
body: <p>I am having a dumb question, which I want to chop off or just select a part of vector elements.</p>
  
  <p>I am using boost matrix to output a matrix of numbers, and boost has a very neat function, matrix_column&lt;> (matrix, index) to select a column as vector in boost matrix. </p>
  
  <p>Now I need to cut the selected column to two parts, and do different calculations.
  I think I want a way of selecting elements like in matlab or R, ie vector(1:5), return 1 to 5 indexed vector.</p>
  
  <p>Could you guys please give me some suggestions or directions? Right now I am thinking a way of copy selected part to a new vector to process my calculation, not so efficient.</p>