So I want to delete rows of a matrix that contain zero, but only for specific columns. For example:
A = [[0 0 0 0; 1 2 0 4; 2 0 1 1; 0 0 0 0; 1 2 3 4; 0 1 2 3];
This is easily solved using the find() function:
find()
B = A(find(A(:,2)~=0),:)
find() by default returns rows, so calling it in this case returns the index of the rows where the value on the second column is not 0.