I have a situation where I have a 6x100 matrix like the one below:
What I would like to do is to write a code that says: for every column in x keep only those columns whose first and second rows have positive entries, while the fourth one has a negative entry. So let's take two representative columns like the ones below:
The code should exclude the first column and keep the second; this for every column in x.
Can anyone help me with that?