title: find row with multiple attributes
body: <p>I have a matrix of size <code>10000x5</code> with format <code>[id, year, month, day, value]</code></p>
  
  <p>For example:</p>
  
  <pre><code>[ 1 2004 1 1 100;
    1 2004 1 2 201;
    2 2004 1 1  30;
    2 2004 1 2 123;
    2 2005 1 1 300;
    2 2005 1 2 103;
    ...]
  </code></pre>
  
  <p>I would like to filter and copy a subset of this matrix into another matrix, given the search criteria <code>year==2004 &amp;&amp; month==1 &amp;&amp; day==1</code>. So what I thought is to first find out what is the row index of vectors which match to the given criteria.  </p>
  
  <p>First I tried with, </p>
  
  <pre><code>[row] = find((data(:,2) == 2004 &amp;&amp; data(:,3) == 1 &amp;&amp; data(:,4) == 1));
  </code></pre>
  
  <p>But it doesn't seems to work with multiple criteria, I get the error</p>
  
  <pre><code>Operands to the || and &amp;&amp; operators must be convertible to logical scalar values.
  </code></pre>
  
  <p>Next I tried with</p>
  
  <pre><code>key = [2004 1 1];
  [~,index] = ismember(data,key,'rows')
  </code></pre>
  
  <p>But it said</p>
  
  <pre><code>Error using ismember. A and S must have the same number of columns.
  </code></pre>
  
  <p>Is there any way to refine the syntax, or another API to search with multiple criteria?</p>