title: Matlab: How to generate the set of 3x3 matrices containing all combinations and permutations of ones and/or zeroes (with one constraint)
body: <p>I'd like to generate the set of 3x3 matrices containing all permutations and combinations of ones and/or zeroes (ie. including zeros matrix and ones matrix), but with one constraint: If any row (say 'a') contains more than one 1 entry, any other row (say 'b') with a 1 entry in one of these columns must also contain a 1 entry in the other column(s) in which row 'a' holds a 1 entry. </p>
  
  <p>I hope that's clear and would be very grateful for any help,</p>
  
  <p>Thanks,</p>
  
  <p>Harry     </p>