title: Identifying data outliers
body: <p>I have a data set organized into a structure. I have a large number of sensors, and each has four readings <code>a</code> through <code>d</code>, so the structure <code>D</code> contains <code>D.sensorID</code>, <code>D.a</code>, <code>D.b</code>, <code>D.c</code>, and <code>D.d</code>. I'm looking for the outliers in the distribution of the readings. I've plotted the data and chosen the limits and written a script that identifies sensorID's with readings outside of these limits and saves them to an array:</p>
  
  <pre><code>    aMax = 5;
      aHighIndices = find(D.a&gt;aMax);
      aMin = 0;
      aLowIndices = find(D.a&lt;aMin);
      aHighLength = size(aHighIndices);
      for i = 1:aHighLength
      A_hi(i) = D.sensorID(aHighIndices(i));
      end
  </code></pre>
  
  <p>This is repeated: <code>a_Hi</code>, <code>a_Low</code>, <code>b_Hi</code>, etc... and then I patch the results together:</p>
  
  <p><code>outliers = [A_hi; A_low; B_low; B_hi; C_low; C_hi; D_low; D_hi];</code></p>
  
  <p>Is there a more concise way to do this?</p>