title: Matlab: how to solve a binary system of equations?
body: <p>I'm trying to solve a system of equation with the following form:</p>
  
  <pre><code>a5 + a6 + a7 + f5 + f6 + f7 = 11;
  b5 + b6 + b7 + e5 + e6 + e7 = 100;
  c5 + c6 + c7 + d5 + d6 + d7 = 100;
  
  a5 + b5 + c5 + d5 + e5 + f5 = 11;
  a6 + b6 + c6 + d6 + e6 + f6 = 100;
  a7 + b7 + c7 + d7 + e7 + f7 = 100;
  </code></pre>
  
  <p>where all the variables and digits are binaries.</p>
  
  <p>Is there a way to do this in Matlab?</p>
  
  <p>For example, by substituting the binary numbers by there decimal values:</p>
  
  <pre><code>a5 + a6 + a7 + f5 + f6 + f7 = 3;
  b5 + b6 + b7 + e5 + e6 + e7 = 4;
  c5 + c6 + c7 + d5 + d6 + d7 = 4;
  
  a5 + b5 + c5 + d5 + e5 + f5 = 3;
  a6 + b6 + c6 + d6 + e6 + f6 = 4;
  a7 + b7 + c7 + d7 + e7 + f7 = 4;
  </code></pre>
  
  <p>and tell Matlab somehow that the unknowns should be integers and from the interval [0:1]?</p>
  
  <hr>
  
  <p>Here is the A x = b form:</p>
  
  <pre><code>A = [1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1;
  0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0;
  0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0;
  1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0;
  0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0;
  0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1];
  
  b = [3 4 4 3 4 4];
  </code></pre>
  
  <p>what would be then the next step?</p>