MATLAB: How to delete an entire row if a specific column contains a zero

Right, so I'm new to MATLAB, but what I have is a large data set (10074×4), the second column of which is a binary code, so whenever theres a zero in that column I want to delete the entire row. Any tips on how to go about doing this? Thanks

Best Answer

Many ways in MATLAB. One way:
%create some data
X = ones(20,2);
X(1:10,2) = 0;
indices = find(X(:,2)==0);
X(indices,:) = [];
Wayne