title: split matrix into separate binary matrices based on integer value - matlab
body: <pre><code>m  = randi([1 4],4,4)
  </code></pre>
  
  <p>I'd like to create separate binary matrices for each unique integer:</p>
  
  <pre><code>mm{1} = m==1
  mm{2} = m==2
  mm{3} = m==3
  mm{4} = m==4
  </code></pre>
  
  <p>With four different integers the above is fine, but my original matrix has so many unique values, I wonder if there is a more automated way of doing this.</p>