title: Random selection of matrix columns
body: <p>I have an <code>m x n</code> matrix and I want to use it in some neural networks applications in MATLAB.</p>
  
  <p>For example,</p>
  
  <pre><code>A = [ 24 22 35 40 30 ; 32 42 47 45 39 ; 14 1 10 5 9 ; 2 8 4 1 8] ;
  </code></pre>
  
  <p>I want to randomly train some columns and test the other remaining columns.
  So, the first matrix will contain three random, distinct columns taken from the original matrix A, while the second matrix contains the remaining two columns.</p>
  
  <p>How can I extract these matrices ?</p>