title: How can I select random samples from several matrices in MATLAB?
body: <p>Using MATLAB, I have several 8760x1 matrices. I need to randomly select some data from the first one, and then select the data from the other matrices, but the data that is on the same position as got from the first i.e.</p>
  
  <pre><code>data1 = [a b c d e];
  data2 = [f g h i j];
  </code></pre>
  
  <p>I datasample [a c d], then I need to select [f h i], on this order, giving me:</p>
  
  <pre><code>out1 = [a c d]
  out2 = [f h i]
  </code></pre>
  
  <p>is <code>datasample</code> the best tool for this? Or how can I do it?
  Thanks.</p>