title: Deleting elements from a cell in Matlab
body: <p>In a matrix, to remove the columns in which the element of the first line is 0, we can use:</p>
  
  <pre><code>ind2remove = (A(1,:) == 0);
  A(:,ind2remove) = [];
  </code></pre>
  
  <p>How do I do that if <code>A</code> is a cell? I want to remove the columns in which the element of the first row is 0.</p>
  
  <p>I tried:</p>
  
  <pre><code>ind2remove = (A{1,:} == 0);
  A{:,ind2remove} = [];
  </code></pre>
  
  <p>but I got the error message: </p>
  
  <pre><code>??? Error using ==&gt; eq
  Too many input arguments.
  
  Error in ==&gt; ind2remove = (A{1,:} == 0);
  </code></pre>