title: How to efficiently find correlation and discard points outside 3-sigma range in MATLAB?
body: <p>I have a data file <code>m.txt</code> that looks something like this (with a lot more points):</p>
  
  <pre><code>286.842995
  3.444398
  3.707202
  338.227797
  3.597597
  283.740414
  3.514729
  3.512116
  3.744235
  3.365461
  3.384880
  </code></pre>
  
  <p>Some of the values (like <code>338.227797</code>) are <strong><em>very different</em></strong> from the values I generally expect (smaller numbers).</p>
  
  <ul>
  <li><p>So, I am thinking that 
  I will remove all the points that lie outside the <code>3-sigma range</code>. How can I do that in MATLAB?</p></li>
  <li><p>Also, the bigger problem is that this file has a separate file <code>t.txt</code> associated with it which stores the corresponding time values for these numbers. So, I'll have to remove the corresponding time values from the <code>t.txt</code> file also. </p></li>
  </ul>
  
  <p>I am still learning MATLAB, and I know there would be some good way of doing this (better than storing indices of the elements that were removed from <code>m.txt</code> and then removing those elements from the <code>t.txt</code> file)</p>