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];
I want for matrix A to check if the second and/or 4th columns contain zero's. If this is true: then delete the whole row. So the result should be:
A = [1 2 0 4; 1 2 3 4; 0 1 2 3];
I used this function:
new_a = A(all(A,2),:)
But I deleted all the rows containing zeros.