title: Remove zeros column and rows from a matrix matlab
body: <p>I would like to remove some columns and rows from a big matrix. Those are the columns and the rows which have all zeros values. Is there any function in MATLAB that can do it for you quite fast? My matrices are sparse. I am doing this way:</p>
  
  <pre><code> % To remove all zero columns from A
   ind = find(sum(A,1)==0) ;
   A(:,ind) = [] ;
  
   % To remove all zeros rows from A
   ind = find(sum(A,2)==0) ;
   A(ind,:) = [] ;
  </code></pre>
  
  <p>It would be nice to have a line of code for this as I may do this kind of task repeatedly. Thanks</p>