title: MATLAB: Check my syntax please
body: <p>My goal is to make a variable that is the number of rows that have both a value of <code>1</code> in column <code>4</code> and a value of <code>1</code> in column <code>5</code>.</p>
  
  <p>This does not work:  </p>
  
  <pre><code>X =
  
      4 4 4 2 0 
      4 4 4 1 1
      4 4 4 2 1
      4 4 4 1 0
  
  A= numel(X(X(:,4)==1) &amp;&amp; (X(:,5)==1));
  </code></pre>
  
  <p><code>numel</code> gives the number of values (ex. if there are five ones in column <code>4</code>, it returns <code>5</code>)<br>
  <code>X</code> is my matrix. What do I do?</p>