MATLAB: Delete rows which contain at least 1 zero

columnrowzeros

Hi there I have a large matrix A. I want to delete every row which contains at least 1 zero in the row.

Best Answer

out = A(all(A,2),:);
or
out=A;
out(any(A==0,2),:) = [];