Dear All,
sorry my previous post was a bit short and I failed to explain. There are of course lots of solutions. Here are some more:
Select[{{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, #[[{1, 3}]] == {0, 0} &]
Here's another one:
Select[{{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, #.{1, 0, 1, 0} == 0 &]
Also there is one which is quite close to Mary's original solution:
Select[{{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, SubsetQ[Position[#, 0], {{1}, {3}}] &]
Note that there are tiny differences between all of these. For example we can distinguish between approximate numbers and exact numbers:
Select[{{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, #[[1]] == 0 && #[[3]] == 0 &]
and
Select[{{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, #[[1]] === 0 && #[[3]] === 0 &]
both work, but they react differently to finite precision:
Select[1. {{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, #[[1]] === 0 && #[[3]] === 0 &]
and
Select[1. {{0, 0, 1, 0}, {0, 0, 0, 0}, {0, 1, 0, 1}, {1, 0, 0, 0}}, #[[1]] == 0 && #[[3]] == 0 &]
give different results. Same can be achieved with Cases.
Cheers,
Marco