title: Removing extreme values in a vector in Matlab?
body: <p>So say, I have a = [2 7 4 9 2 4 999]</p>
  
  <p>And I'd like to remove 999 from the matrix (which is an obvious outlier).</p>
  
  <p>Is there a <em>general</em> way to remove values like this? I have a set of vectors and not all of them have extreme values like that. prctile(a,99.5) is going to output the largest number in the vector no matter how extreme (or non-extreme) it is.</p>